Add a command to check the system derivation actually changed
This commit is contained in:
parent
7327f4fa5a
commit
b403a0791b
|
@ -1,9 +1,17 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
let
|
||||
nix-refactor = pkgs.writeShellScriptBin "nix-refactor" ''
|
||||
origin=$(${pkgs.coreutils-full}/bin/readlink /run/current-system)
|
||||
result=$(${pkgs.lib.getExe pkgs.nixos-rebuild} build && ${pkgs.coreutils-full}/bin/readlink result)
|
||||
${pkgs.diffutils}/bin/diff -q <(echo "$origin" ) <(echo "$result")
|
||||
'';
|
||||
in
|
||||
pkgs.mkShell {
|
||||
name = "nixosbuildshell";
|
||||
nativeBuildInputs = with pkgs; [
|
||||
git
|
||||
nixFlakes
|
||||
nix-refactor
|
||||
python3
|
||||
python310Packages.autopep8
|
||||
python310Packages.black
|
||||
|
@ -19,3 +27,4 @@ pkgs.mkShell {
|
|||
''}/bin:$PATH
|
||||
'';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue