This commit is contained in:
Nox Sluijtman 2023-08-29 18:54:00 +02:00
parent cc998e931d
commit bfcdff9f1f
4 changed files with 61 additions and 0 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
maim-utils-*.tar.gz
result

20
default.nix Normal file
View file

@ -0,0 +1,20 @@
{ stdenv, scdoc, pipe-viewer, ...}:
stdenv.mkDerivation rec {
pname = "maim-utils";
version = "v1.0";
src = ./.;
buildInputs = [ scdoc ];
buildPhase = ''
scdoc < ${pname}.1.scd > ${pname}.1
'';
installPhase = ''
mkdir -p $out/bin $out/share/{man/man1,zsh/site-functions}
cp ${pname} $out/bin/
cp ${pname}.1 $out/share/man/man1/
cp zsh.completion $out/share/zsh/site-functions/_${pname}
'';
}

26
flake.lock Normal file
View file

@ -0,0 +1,26 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1693183237,
"narHash": "sha256-c7OtyBkZ/vZE/WosBpRGRtkbWZjDHGJP7fg1FyB9Dsc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ea5234e7073d5f44728c499192544a84244bf35a",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.05",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

14
flake.nix Normal file
View file

@ -0,0 +1,14 @@
{
description = "Pipe-viewer-and-mpv wrapper";
inputs.nixpkgs.url = "nixpkgs/nixos-23.05";
outputs = {self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
packages.${system} = {
default = pkgs.callPackage ./default.nix {};
};
};
}