pkgs: add comma
This commit is contained in:
parent
76148d75b8
commit
e5fdfd6c44
3 changed files with 77 additions and 0 deletions
42
pkgs/comma/default.nix
Normal file
42
pkgs/comma/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ fzf, lib, makeWrapper, nix-index, shellcheck, stdenvNoCC }:
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "comma";
|
||||
version = "0.1.0";
|
||||
|
||||
src = ./. + "/comma";
|
||||
|
||||
phases = [ "buildPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
buildInputs = [
|
||||
makeWrapper
|
||||
shellcheck
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
shellcheck $src
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp $src $out/bin/${meta.mainProgram}
|
||||
chmod a+x $out/bin/${meta.mainProgram}
|
||||
'';
|
||||
|
||||
wrapperPath = lib.makeBinPath [
|
||||
fzf
|
||||
nix-index
|
||||
];
|
||||
|
||||
fixupPhase = ''
|
||||
patchShebangs $out/bin/${meta.mainProgram}
|
||||
wrapProgram $out/bin/${meta.mainProgram} --prefix PATH : "${wrapperPath}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
mainProgram = ",";
|
||||
description = "A simple script inspired by Shopify's comma, for modern Nix";
|
||||
homepage = "https://gitea.belanyi.fr/ambroisie/nix-config";
|
||||
license = with licenses; [ mit ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue