mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-02-27 14:03:11 -08:00
fix: Nix flake failing due to rosenpass-to
README.md was missing; added it to the list of source files
This commit is contained in:
committed by
Karolin Varner
parent
09aa0e027e
commit
40861cc2ea
35
flake.nix
35
flake.nix
@@ -29,6 +29,7 @@
|
|||||||
]
|
]
|
||||||
(system:
|
(system:
|
||||||
let
|
let
|
||||||
|
scoped = (scope: scope.result);
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
|
|
||||||
# normal nixpkgs
|
# normal nixpkgs
|
||||||
@@ -58,11 +59,35 @@
|
|||||||
cargoToml = builtins.fromTOML (builtins.readFile ./rosenpass/Cargo.toml);
|
cargoToml = builtins.fromTOML (builtins.readFile ./rosenpass/Cargo.toml);
|
||||||
|
|
||||||
# source files relevant for rust
|
# source files relevant for rust
|
||||||
src = pkgs.lib.sources.sourceFilesBySuffices ./. [
|
src = scoped rec {
|
||||||
".lock"
|
# File suffices to include
|
||||||
".rs"
|
extensions = [
|
||||||
".toml"
|
"lock"
|
||||||
];
|
"rs"
|
||||||
|
"toml"
|
||||||
|
];
|
||||||
|
# Files to explicitly include
|
||||||
|
files = [
|
||||||
|
"to/README.md"
|
||||||
|
];
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
filter = (path: type: scoped rec {
|
||||||
|
inherit (lib) any id removePrefix hasSuffix;
|
||||||
|
anyof = (any id);
|
||||||
|
|
||||||
|
basename = baseNameOf (toString path);
|
||||||
|
relative = removePrefix (toString src + "/") (toString path);
|
||||||
|
|
||||||
|
result = anyof [
|
||||||
|
(type == "directory")
|
||||||
|
(any (ext: hasSuffix ".${ext}" basename) extensions)
|
||||||
|
(any (file: file == relative) files)
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
result = pkgs.lib.sources.cleanSourceWith { inherit src filter; };
|
||||||
|
};
|
||||||
|
|
||||||
# builds a bin path for all dependencies for the `rp` shellscript
|
# builds a bin path for all dependencies for the `rp` shellscript
|
||||||
rpBinPath = p: with p; lib.makeBinPath [
|
rpBinPath = p: with p; lib.makeBinPath [
|
||||||
|
|||||||
Reference in New Issue
Block a user