{ 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 ''; }; }; }); }