pkgs: add diff-flake
This is a nice helper to know what has changed after bumping a flake's inputs.
This commit is contained in:
parent
9612258118
commit
7d91351c8e
3 changed files with 160 additions and 0 deletions
35
pkgs/diff-flake/default.nix
Normal file
35
pkgs/diff-flake/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ coreutils, git, gnused, lib, shellcheck, stdenvNoCC }:
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "diff-flake";
|
||||
version = "0.1.0";
|
||||
|
||||
src = ./diff-flake;
|
||||
|
||||
phases = [ "buildPhase" "installPhase" ];
|
||||
|
||||
buildInputs = [
|
||||
shellcheck
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
shellcheck $src
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp $src $out/bin/diff-flake
|
||||
substituteAllInPlace $out/bin/diff-flake
|
||||
patchShebangs $out/bin/diff-flake
|
||||
'';
|
||||
|
||||
cat = "${coreutils}/bin/cat";
|
||||
git = "${git}/bin/git";
|
||||
sed = "${gnused}/bin/sed";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Nix flake helper to visualize changes in closures";
|
||||
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