Skip to content

Commit d6a53db

Browse files
committed
merge ours into mine
2 parents 8bbf7dc + 6271604 commit d6a53db

4 files changed

+14
-6
lines changed

lib/cabal-project-parser.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ let
9090
subdirs = if repo ? subdir
9191
then pkgs.lib.filter (x: x != "") (pkgs.lib.splitString " " repo.subdir)
9292
else ["."];
93+
# All repos served via ssh or git protocols are usually private
94+
is-private = pkgs.lib.substring 0 4 repo.location != "http";
9395
};
9496

9597
# Parse a source-repository-package and return data of `type: git` repositories

lib/call-cabal-project-to-nix.nix

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,16 @@ let
227227
(if inputMap.${repoData.url}.rev != repoData.ref
228228
then throw "${inputMap.${repoData.url}.rev} may not match ${repoData.ref} for ${repoData.url} use \"${repoData.url}/${repoData.ref}\" as the inputMap key if ${repoData.ref} is a branch or tag that points to ${inputMap.${repoData.url}.rev}."
229229
else inputMap.${repoData.url})
230-
else if repoData.sha256 != null
230+
else if repoData.sha256 != null && !repoData.is-private
231231
then fetchgit repoData
232232
else
233-
let drv = builtins.fetchGit { inherit (repoData) url ref; };
234-
in __trace "WARNING: No sha256 found for source-repository-package ${repoData.url} ${repoData.ref} download may fail in restricted mode (hydra)"
235-
(__trace "Consider adding `--sha256: ${hashPath drv}` to the ${cabalProjectFileName} file or passing in a sha256map argument"
236-
drv);
233+
let
234+
drv = builtins.fetchGit repoData;
235+
maybeTrace = x: if repoData.sha256 != null then x else
236+
__trace "WARNING: No sha256 found for source-repository-package ${repoData.url} ${repoData.ref} download may fail in restricted mode (hydra)"
237+
(__trace "Consider adding `--sha256: ${hashPath drv}` to the ${cabalProjectFileName} file or passing in a sha256map argument"
238+
x);
239+
in maybeTrace drv;
237240
in {
238241
# Download the source-repository-package commit and add it to a minimal git
239242
# repository that `cabal` will be able to access from a non fixed output derivation.

lib/pkgconf-nixpkgs-map.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pkgs:
4545
"gstreamer-plugins-base-0.10" = [ "gst-plugins-base" ];
4646
"gstreamer-video-1.0" = [ "gst-plugins-base" ];
4747
"gtk-x11-2.0" = [ "gtk_x11" ];
48+
"ical" = [ "libical" ];
4849
"icudata" = [ "icu" ];
4950
"icui18n" = [ "icu" ];
5051
"icuuc" = [ "icu" ];
@@ -5742,4 +5743,4 @@ pkgs:
57425743
else if pkgs ? gdk_pixbuf
57435744
then [ pkgs.gdk_pixbuf ]
57445745
else [];
5745-
}
5746+
}

lib/system-nixpkgs-map.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ in
9595
# compile C sources (https://github.com/fpco/odbc/blob/master/cbits/odbc.c)
9696
odbc = [ unixODBC ];
9797
opencv = [ opencv3 ];
98+
ical = [ libical ];
9899
icuuc = [ icu ];
99100
icui18n = [ icu ];
100101
icu-i18n = [ icu ];
@@ -114,6 +115,7 @@ in
114115
GeoIP = [ geoip ];
115116
pulse-simple = [ libpulseaudio ];
116117
oath = [ liboauth ];
118+
mcrypt = [ libmcrypt ];
117119
}
118120
# -- windows
119121
// { advapi32 = null; gdi32 = null; imm32 = null; msimg32 = null;

0 commit comments

Comments
 (0)