Clean up flake.nix

main
Elnu 1 year ago
parent f1d2e59b89
commit 1f4a8a2181

@ -4,23 +4,6 @@
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
}, },
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"id": "flake-utils",
"type": "indirect"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
@ -69,14 +52,13 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
} }
}, },
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
@ -107,21 +89,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

@ -6,12 +6,12 @@
rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.url = "github:oxalica/rust-overlay";
}; };
outputs = { self, nixpkgs, rust-overlay, flake-utils }: outputs = { self, nixpkgs, rust-overlay }:
let let
overlays = [ (import rust-overlay) ]; overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit overlays;
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system overlays;
}; };
rustSettings = with pkgs; { rustSettings = with pkgs; {
src = ./.; src = ./.;
@ -19,26 +19,24 @@
buildInputs = [ openssl ]; buildInputs = [ openssl ];
cargoHash = nixpkgs.lib.fakeHash; cargoHash = nixpkgs.lib.fakeHash;
}; };
in in rec {
with pkgs; rec { devShells.${system}.default = with pkgs; mkShell {
devShells.x86_64-linux.default = mkShell {
packages = [ bacon ]; packages = [ bacon ];
inputsFrom = [ inputsFrom = with packages.${system}; [ tatoeba images ];
packages.x86_64-linux.tatoeba
packages.x86_64-linux.images
];
}; };
packages.x86_64-linux.tatoeba = rustPlatform.buildRustPackage (rustSettings // { packages.${system} = {
tatoeba = pkgs.rustPlatform.buildRustPackage (rustSettings // {
pname = "tatoeba"; pname = "tatoeba";
version = "0.1.0"; version = "0.1.0";
buildAndTestSubdir = "tatoeba"; buildAndTestSubdir = "tatoeba";
cargoHash = "sha256-74Jq3saaUyPvNm/0croVOBuMtpN8xT3S4z37nutJdw4="; cargoHash = "sha256-74Jq3saaUyPvNm/0croVOBuMtpN8xT3S4z37nutJdw4=";
}); });
packages.x86_64-linux.images = rustPlatform.buildRustPackage (rustSettings // { images = pkgs.rustPlatform.buildRustPackage (rustSettings // {
pname = "images"; pname = "images";
version = "0.1.0"; version = "0.1.0";
buildAndTestSubdir = "images"; buildAndTestSubdir = "images";
cargoHash = "sha256-fKmTZTcJj/eYCQE9cjiXB/Pt6BdJNZ/e5cSRgbuPIJs="; cargoHash = "sha256-fKmTZTcJj/eYCQE9cjiXB/Pt6BdJNZ/e5cSRgbuPIJs=";
}); });
}; };
};
} }

Loading…
Cancel
Save