Derivation in seperate file
This commit is contained in:
parent
c87cb405d4
commit
1bd76ea8e1
28
default.nix
Normal file
28
default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ pkgs
|
||||
, scdoc
|
||||
, xclip
|
||||
, stdenvNoCC
|
||||
, ...
|
||||
}:
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "irs";
|
||||
version = "0.3";
|
||||
src = ./src;
|
||||
nativeBuildInputs = with pkgs; [
|
||||
scdoc
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
for page in $(find manpages -type f); do
|
||||
scdoc < $page > $(basename $page .scd)
|
||||
done
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{share/man/man1,bin,share/zsh/site-functions}
|
||||
cp bin/* $out/bin/
|
||||
cp completions/* $out/share/zsh/site-functions/
|
||||
cp *.1 $out/share/man/man1/
|
||||
'';
|
||||
|
||||
}
|
|
@ -20,11 +20,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1697655685,
|
||||
"narHash": "sha256-79Kuv+QdgsVc+rkibuAgWHnh8IXrLBTOKg5nM0Qvux0=",
|
||||
"lastModified": 1701053011,
|
||||
"narHash": "sha256-8QQ7rFbKFqgKgLoaXVJRh7Ik5LtI3pyBBCfOnNOGkF0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "80c1aab725151632ddc2a20caeb914e76dd0673c",
|
||||
"rev": "5b528f99f73c4fad127118a8c1126b5e003b01a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
27
flake.nix
27
flake.nix
|
@ -7,31 +7,8 @@
|
|||
flake-utils.lib.eachDefaultSystem ( system:
|
||||
let pkgs = import nixpkgs { inherit system; };
|
||||
in{
|
||||
packages = rec {
|
||||
default = pkgs.stdenvNoCC.mkDerivation rec {
|
||||
pname = "irs";
|
||||
version = "0.2";
|
||||
|
||||
src = ./src;
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
coreutils
|
||||
scdoc
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
for page in $(find manpages -type f); do
|
||||
scdoc < $page > $(basename $page .scd)
|
||||
done
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{share/man/man1,bin,share/zsh/site-functions}
|
||||
cp bin/* $out/bin/
|
||||
cp completions/* $out/share/zsh/site-functions/
|
||||
cp *.1 $out/share/man/man1/
|
||||
'';
|
||||
};
|
||||
packages = {
|
||||
default = pkgs.callPackage ./default.nix {};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue