Moved 'noise' to seperate derivation
This commit is contained in:
parent
df260f4f4f
commit
a0be797dd5
35 changed files with 62 additions and 10 deletions
25
flake.nix
25
flake.nix
|
@ -4,13 +4,24 @@
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs =
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
{
|
||||||
let pkgs = import nixpkgs { inherit system; };
|
self,
|
||||||
in {
|
nixpkgs,
|
||||||
packages = {
|
flake-utils,
|
||||||
default = pkgs.callPackage ./default.nix { };
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages = rec {
|
||||||
|
default = irs;
|
||||||
|
irs = pkgs.callPackage ./irs.nix { };
|
||||||
|
noise = pkgs.callPackage ./noise.nix { };
|
||||||
};
|
};
|
||||||
formatter = pkgs.nixpkgs-fmt;
|
formatter = pkgs.nixpkgs-fmt;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
scdoc,
|
scdoc,
|
||||||
xclip,
|
xclip,
|
||||||
maim,
|
maim,
|
||||||
|
@ -8,12 +7,11 @@
|
||||||
nushell,
|
nushell,
|
||||||
xdotool,
|
xdotool,
|
||||||
mpc-cli,
|
mpc-cli,
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
pname = "irs";
|
pname = "irs";
|
||||||
version = "0.6";
|
version = "0.6";
|
||||||
src = ./src;
|
src = ./src/irs;
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
scdoc
|
scdoc
|
||||||
nushell
|
nushell
|
37
noise.nix
Normal file
37
noise.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
scdoc,
|
||||||
|
stdenvNoCC,
|
||||||
|
nushell,
|
||||||
|
mpc-cli,
|
||||||
|
}:
|
||||||
|
stdenvNoCC.mkDerivation {
|
||||||
|
pname = "noise";
|
||||||
|
version = "0.6";
|
||||||
|
src = ./src/noise;
|
||||||
|
nativeBuildInputs = [
|
||||||
|
scdoc
|
||||||
|
nushell
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
for page in $(find manpages -type f); do
|
||||||
|
scdoc < $page > $(basename $page .scd)
|
||||||
|
done
|
||||||
|
export dontPatchShebangs=1
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/{share/man/man1,bin,share/zsh/site-functions}
|
||||||
|
cp bin/* $out/bin/
|
||||||
|
cp completions/* $out/share/zsh/site-functions/
|
||||||
|
cp *.1 $out/share/man/man1/
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
substituteInPlace $out/bin/* \
|
||||||
|
--replace "mpc " "${mpc-cli}/bin/mpc "
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
6
src/noise/completions/_noise
Normal file
6
src/noise/completions/_noise
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#compdef noise _noise
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
"1: :(next prev shuffle stop start toggle)" \
|
||||||
|
"*::args:->args"
|
||||||
|
_arguments : $arguments
|
Loading…
Add table
Add a link
Reference in a new issue