summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/haskell/nix-diff/nixos-system.patch
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-12-13 18:39:55 +0100
committerlassulus <lassulus@lassul.us>2017-12-13 18:39:55 +0100
commit39c0adc31b5ea7bf88d66e3a6f4e92a27a117620 (patch)
tree6f59951253abb0110f3d4ce862c665d8328c515f /krebs/5pkgs/haskell/nix-diff/nixos-system.patch
parent5e76c7944c4865eeebca8bdfeefe76235fed5623 (diff)
parent27dfb3c618003b54bd3525bf38cef7ac12a8be64 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/5pkgs/haskell/nix-diff/nixos-system.patch')
-rw-r--r--krebs/5pkgs/haskell/nix-diff/nixos-system.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/krebs/5pkgs/haskell/nix-diff/nixos-system.patch b/krebs/5pkgs/haskell/nix-diff/nixos-system.patch
new file mode 100644
index 00000000..03e186aa
--- /dev/null
+++ b/krebs/5pkgs/haskell/nix-diff/nixos-system.patch
@@ -0,0 +1,18 @@
+diff --git a/src/Main.hs b/src/Main.hs
+index 959ab8e..d3b6077 100644
+--- a/src/Main.hs
++++ b/src/Main.hs
+@@ -95,7 +95,12 @@ pathToText path =
+ underneath `/nix/store`, but this is the overwhelmingly common use case
+ -}
+ derivationName :: FilePath -> Text
+-derivationName = Data.Text.dropEnd 4 . Data.Text.drop 44 . pathToText
++derivationName p =
++ if Data.Text.isPrefixOf "nixos-system" s
++ then "nixos-system"
++ else s
++ where
++ s = Data.Text.dropEnd 4 . Data.Text.drop 44 . pathToText $ p
+
+ -- | Group input derivations by their name
+ groupByName :: Map FilePath (Set Text) -> Map Text (Map FilePath (Set Text))