irs/flake.nix

38 lines
944 B
Nix
Raw Normal View History

2023-10-20 14:19:31 +02:00
{ description = "A few random scripts";
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixos-23.05;
flake-utils.url = github:numtide/flake-utils;
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem ( system:
let pkgs = import nixpkgs { inherit system; };
in{
packages = rec {
default = pkgs.stdenvNoCC.mkDerivation rec {
pname = "irs";
2023-10-21 00:31:58 +02:00
version = "0.2";
2023-10-20 14:19:31 +02:00
src = ./src;
buildInputs = with pkgs; [
coreutils
scdoc
];
buildPhase = ''
for page in $(find manpages -type f); do
scdoc < $page > $(basename $page .scd)
done
'';
installPhase = ''
2023-10-20 17:55:10 +02:00
mkdir -p $out/{share/man/man1,bin,share/zsh/site-functions}
2023-10-20 14:19:31 +02:00
cp bin/* $out/bin/
2023-10-20 17:55:10 +02:00
cp completions/* $out/share/zsh/site-functions/
cp *.1 $out/share/man/man1/
2023-10-20 14:19:31 +02:00
'';
2023-08-16 18:05:22 +02:00
};
};
2023-10-20 14:19:31 +02:00
});
2023-08-16 18:05:22 +02:00
}