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": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697655685,
|
"lastModified": 1701053011,
|
||||||
"narHash": "sha256-79Kuv+QdgsVc+rkibuAgWHnh8IXrLBTOKg5nM0Qvux0=",
|
"narHash": "sha256-8QQ7rFbKFqgKgLoaXVJRh7Ik5LtI3pyBBCfOnNOGkF0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "80c1aab725151632ddc2a20caeb914e76dd0673c",
|
"rev": "5b528f99f73c4fad127118a8c1126b5e003b01a9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
27
flake.nix
27
flake.nix
|
@ -7,31 +7,8 @@
|
||||||
flake-utils.lib.eachDefaultSystem ( system:
|
flake-utils.lib.eachDefaultSystem ( system:
|
||||||
let pkgs = import nixpkgs { inherit system; };
|
let pkgs = import nixpkgs { inherit system; };
|
||||||
in{
|
in{
|
||||||
packages = rec {
|
packages = {
|
||||||
default = pkgs.stdenvNoCC.mkDerivation rec {
|
default = pkgs.callPackage ./default.nix {};
|
||||||
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/
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue