flake: Reduce fileset (#29)

further reduce the rust build inputs. the flake shouldn't be there
This commit is contained in:
Noa Aarts 2024-10-22 20:49:28 +02:00 committed by GitHub
parent 81abf3982d
commit 6c9de45c6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 162 additions and 7 deletions

153
flake.lock generated
View file

@ -7,6 +7,51 @@
], ],
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": {
"lastModified": 1729578683,
"narHash": "sha256-h0Wmvrkadbyi3IJXFLPi+QyYjCAKDr2xQ6dLxlQ8cXY=",
"owner": "nix-community",
"repo": "fenix",
"rev": "d66cda53e8193a878742dcadb5bb75f4df7c3c0a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"fenix_2": {
"inputs": {
"nixpkgs": [
"tsunami",
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src_2"
},
"locked": {
"lastModified": 1729578683,
"narHash": "sha256-h0Wmvrkadbyi3IJXFLPi+QyYjCAKDr2xQ6dLxlQ8cXY=",
"owner": "nix-community",
"repo": "fenix",
"rev": "d66cda53e8193a878742dcadb5bb75f4df7c3c0a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"fenix_3": {
"inputs": {
"nixpkgs": [
"tsunami",
"flurry",
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src_3"
},
"locked": { "locked": {
"lastModified": 1729492502, "lastModified": 1729492502,
"narHash": "sha256-d6L4bBlUWr4sHC+eRXo+4acFPEFXKmqHpM/BfQ5gQQw=", "narHash": "sha256-d6L4bBlUWr4sHC+eRXo+4acFPEFXKmqHpM/BfQ5gQQw=",
@ -21,7 +66,42 @@
"type": "github" "type": "github"
} }
}, },
"flurry": {
"inputs": {
"fenix": "fenix_3",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1729619105,
"narHash": "sha256-YdXfC+djOW2LjsjqbraSKBs/rEopujQiVeMAWDteE/c=",
"owner": "itepastra",
"repo": "flurry",
"rev": "81abf3982dd31bbf8bece1296c85cb2fa0b61693",
"type": "github"
},
"original": {
"owner": "itepastra",
"repo": "flurry",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1729619492,
"narHash": "sha256-VPd3fRyxlIgYxQ8z5uq6tp13wG/cYvPfZh0Z6QNlt1k=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "174ae77ad884f40732b2597b604e55c438915e5c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1729568966, "lastModified": 1729568966,
"narHash": "sha256-t7r899w6fZh9SOOgDykmqUz7DwK9Xw1CwFLri6Ga0Bs=", "narHash": "sha256-t7r899w6fZh9SOOgDykmqUz7DwK9Xw1CwFLri6Ga0Bs=",
@ -37,13 +117,64 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": {
"locked": {
"lastModified": 1729619492,
"narHash": "sha256-VPd3fRyxlIgYxQ8z5uq6tp13wG/cYvPfZh0Z6QNlt1k=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "174ae77ad884f40732b2597b604e55c438915e5c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"fenix": "fenix", "fenix": "fenix",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"tsunami": "tsunami"
} }
}, },
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1729533545,
"narHash": "sha256-A/AuEWcGwwjpfBCZqWDNNg5GwYrJduzLvlMe+A7xG5U=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "de2ff17bc513807412d7bbaba1d995a774938583",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"rust-analyzer-src_2": {
"flake": false,
"locked": {
"lastModified": 1729533545,
"narHash": "sha256-A/AuEWcGwwjpfBCZqWDNNg5GwYrJduzLvlMe+A7xG5U=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "de2ff17bc513807412d7bbaba1d995a774938583",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"rust-analyzer-src_3": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1729454508, "lastModified": 1729454508,
@ -59,6 +190,26 @@
"repo": "rust-analyzer", "repo": "rust-analyzer",
"type": "github" "type": "github"
} }
},
"tsunami": {
"inputs": {
"fenix": "fenix_2",
"flurry": "flurry",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1729621099,
"narHash": "sha256-S81GQuMYq20g/QKWk8iU7PKvIUmxPktQOv1ezpolKcs=",
"owner": "itepastra",
"repo": "tsunami",
"rev": "3afd2d06ff326532a82b6fb9d1c0380cafbe6cb0",
"type": "github"
},
"original": {
"owner": "itepastra",
"repo": "tsunami",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -5,9 +5,12 @@
url = "github:nix-community/fenix"; url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
tsunami = {
url = "github:itepastra/tsunami";
};
}; };
outputs = { self, fenix, nixpkgs, ... }: outputs = { self, fenix, nixpkgs, tsunami, ... }:
let let
allSystems = [ allSystems = [
"x86_64-linux" # 64-bit Intel/AMD Linux "x86_64-linux" # 64-bit Intel/AMD Linux
@ -17,6 +20,7 @@
]; ];
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f { forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
inherit system; inherit system;
inherit tsunami;
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
fpkgs = import fenix { inherit system; }; fpkgs = import fenix { inherit system; };
}); });
@ -31,24 +35,22 @@
rec { rec {
default = flurry; default = flurry;
flurry = flurry =
(pkgs.makeRustPlatform { cargo = toolchain; rustc = toolchain; }).buildRustPackage { (pkgs.makeRustPlatform { cargo = toolchain; rustc = toolchain; }).buildRustPackage rec {
pname = "flurry"; pname = "flurry";
version = "0.1.0"; version = "0.1.0";
cargoLock.lockFile = ./Cargo.lock; cargoLock.lockFile = "${src}/Cargo.lock";
src = fs.toSource { src = fs.toSource {
root = ./.; root = ./.;
fileset = fs.unions [ fileset = fs.unions [
./Cargo.lock ./Cargo.lock
./Cargo.toml ./Cargo.toml
./flake.nix
./flake.lock
./src ./src
]; ];
}; };
}; };
}); });
devShells = forAllSystems devShells = forAllSystems
({ pkgs, fpkgs, ... }: ({ pkgs, fpkgs, system, ... }:
let let
ffpkgs = fpkgs.complete; ffpkgs = fpkgs.complete;
in in
@ -62,6 +64,8 @@
ffpkgs.rustc ffpkgs.rustc
ffpkgs.rustfmt ffpkgs.rustfmt
pkgs.wgo pkgs.wgo
self.packages.${system}.flurry
tsunami.packages.${system}.tsunami
]; ];
}; };
}); });