diff --git a/.gitignore b/.gitignore index 8fb68df..57b088d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ arbit-*.tar.gz +result diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..a9520f1 --- /dev/null +++ b/default.nix @@ -0,0 +1,20 @@ +{ stdenv, scdoc, pipe-viewer, ...}: +stdenv.mkDerivation rec { + pname = "arbit"; + version = "v1.2"; + + src = ./.; + + buildInputs = [ scdoc ]; + + buildPhase = '' + scdoc < arbit.1.scd > arbit.1 + ''; + + installPhase = '' + mkdir -p $out/bin $out/share/{man/man1,zsh/site-functions} + cp arbit $out/bin/ + cp arbit.1 $out/share/man/man1/ + cp zsh.completion $out/share/zsh/site-functions/_arbit + ''; +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..7fe53d6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,14 @@ +{ + description = "Pipe-viewer-and-mpv wrapper"; + + inputs.nixpkgs.url = "github:nixpkgs/nixos-22.05"; + outputs = {self, nixpkgs }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in { + packages.${system} = { + default = pkgs.callPackage ./default.nix {}; + }; + }; +}