upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-02-20 16:37:49 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-02-20 16:37:49 +0000
commit878e098be0654c668f2fbf9f2ebf12ec57354e5c (patch)
tree2b2d8a0c9c161da124a9937b7fac376344cd3023 /flake.nix
parent7dcc1068248d37dfcf7a7f05f1c933be88aedb47 (diff)
refactor: run nixfmt
format the nix code with nixfmt
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix54
1 files changed, 26 insertions, 28 deletions
diff --git a/flake.nix b/flake.nix
index 5c062c9..ff528e5 100644
--- a/flake.nix
+++ b/flake.nix
@@ -9,13 +9,9 @@
9 flake-utils.lib.eachDefaultSystem (system: 9 flake-utils.lib.eachDefaultSystem (system:
10 let 10 let
11 overlays = [ (import rust-overlay) ]; 11 overlays = [ (import rust-overlay) ];
12 pkgs = import nixpkgs { 12 pkgs = import nixpkgs { inherit system overlays; };
13 inherit system overlays;
14 };
15 manifest = pkgs.lib.importTOML ./Cargo.toml; 13 manifest = pkgs.lib.importTOML ./Cargo.toml;
16 in 14 in with pkgs; {
17 with pkgs;
18 {
19 devShells.default = mkShell { 15 devShells.default = mkShell {
20 16
21 nativeBuildInputs = [ 17 nativeBuildInputs = [
@@ -45,34 +41,36 @@
45 }; 41 };
46 # Create packages for each binary defined in Cargo.toml 42 # Create packages for each binary defined in Cargo.toml
47 packages.default = pkgs.rustPlatform.buildRustPackage { 43 packages.default = pkgs.rustPlatform.buildRustPackage {
48 pname = manifest.package.name; 44 pname = manifest.package.name;
49 version = manifest.package.version; 45 version = manifest.package.version;
50 src = ./.; 46 src = ./.;
51 cargoLock = { 47 cargoLock = {
52 lockFile = ./Cargo.lock; 48 lockFile = ./Cargo.lock;
53 outputHashes = { 49 outputHashes = {
54 "rexpect-0.5.0" = "0amxyp81r90gfqlx5dnfjsmd403kf5hcw0crzpcmsbaviavxff4y"; 50 "rexpect-0.5.0" =
55 "simple-websockets-0.1.6" = "0910bbl7p3by18w3wks8gbgdg8879hn2c39z1bkr5pcvfkcxmaf3"; 51 "0amxyp81r90gfqlx5dnfjsmd403kf5hcw0crzpcmsbaviavxff4y";
56 }; 52 "simple-websockets-0.1.6" =
53 "0910bbl7p3by18w3wks8gbgdg8879hn2c39z1bkr5pcvfkcxmaf3";
57 }; 54 };
58 buildInputs = [
59 pkg-config # required by git2
60 openssl
61 ];
62 nativeBuildInputs = [
63 pkg-config # required by git2
64 openssl
65 ];
66 doCheck = false;
67 }; 55 };
56 buildInputs = [
57 pkg-config # required by git2
58 openssl
59 ];
60 nativeBuildInputs = [
61 pkg-config # required by git2
62 openssl
63 ];
64 doCheck = false;
65 };
68 # Create a tarball for the built package 66 # Create a tarball for the built package
69 packages.tarball = stdenv.mkDerivation { 67 packages.tarball = stdenv.mkDerivation {
70 name = "${manifest.package.name}-${manifest.package.version}-${system}.tar.gz"; 68 name =
69 "${manifest.package.name}-${manifest.package.version}-${system}.tar.gz";
71 buildInputs = [ coreutils ]; 70 buildInputs = [ coreutils ];
72 buildPhase = '' 71 buildPhase = ''
73 tar -czf $out/${manifest.package.name}-${manifest.package.version}-${system}.tar.gz -C $out . 72 tar -czf $out/${manifest.package.name}-${manifest.package.version}-${system}.tar.gz -C $out .
74 ''; 73 '';
75 }; 74 };
76 } 75 });
77 ); 76}
78} \ No newline at end of file