irs/flake.nix

39 lines
862 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";
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 = ''
mkdir -p $out/{share/man/man1,bin}
cp bin/* $out/bin/
cp *.1 $out/share/man/man1
'';
2023-08-16 18:05:22 +02:00
};
};
2023-10-20 14:19:31 +02:00
});
2023-08-16 18:05:22 +02:00
}