Attempt at flake nr1

This commit is contained in:
Nox Sluijtman 2023-08-29 18:10:03 +02:00
parent 022e278a32
commit 66f52fe88e
3 changed files with 35 additions and 0 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
arbit-*.tar.gz arbit-*.tar.gz
result

20
default.nix Normal file
View file

@ -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
'';
}

14
flake.nix Normal file
View file

@ -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 {};
};
};
}