From 66f52fe88ea0fd5a74a6d8ff57e1b6720d8fb5e1 Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Tue, 29 Aug 2023 18:10:03 +0200 Subject: [PATCH] Attempt at flake nr1 --- .gitignore | 1 + default.nix | 20 ++++++++++++++++++++ flake.nix | 14 ++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 default.nix create mode 100644 flake.nix 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 {}; + }; + }; +}