summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/haskell/nix-diff/nixos-system.patch
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2017-12-18 21:24:28 +0100
committermakefu <github@syntax-fehler.de>2017-12-18 21:24:28 +0100
commitaf308642031f971bc30c5694385eb7af1e9ea618 (patch)
tree7e9e55f7d5de874a61a5d9294065a4f9749ee83e /krebs/5pkgs/haskell/nix-diff/nixos-system.patch
parent4feafd70204f9c13500bd427d250fac60ca595ef (diff)
parent676c76dd8e0b5cbe3d1bdba49b21b1b5cfc578a1 (diff)
Merge branch 'master' of prism:stockholm
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 000000000..03e186aa9
--- /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))