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";
|
|
|
|
version = "0.1";
|
|
|
|
|
|
|
|
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
|
|
|
}
|