factor out nix code into new files via makeScope
This makes the Nix code a lot easier to reason about.
This commit is contained in:
committed by
Matthias Ahouansou
parent
c9ee4a920e
commit
3336d3f812
34
nix/pkgs/book/default.nix
Normal file
34
nix/pkgs/book/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
# Keep sorted
|
||||
{ default
|
||||
, inputs
|
||||
, mdbook
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "${default.pname}-book";
|
||||
version = default.version;
|
||||
|
||||
|
||||
src = let filter = inputs.nix-filter.lib; in filter {
|
||||
root = inputs.self;
|
||||
|
||||
# Keep sorted
|
||||
include = [
|
||||
"book.toml"
|
||||
"conduit-example.toml"
|
||||
"debian/README.md"
|
||||
"docs"
|
||||
"README.md"
|
||||
];
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
mdbook
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
mdbook build
|
||||
mv public $out
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user