Skip to content

Commit

Permalink
Use latest iohk-nix. Remove unused patches.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbgi committed Jan 21, 2019
1 parent c8f6aa5 commit 48fed4c
Show file tree
Hide file tree
Showing 23 changed files with 7 additions and 3,398 deletions.
90 changes: 0 additions & 90 deletions nix/config.nix
@@ -1,93 +1,3 @@
{
# allow building for windows
allowUnsupportedSystem = true;
# we want the 64bit wine version
wine.build = "wine64";

# sadly we need to patch GHC a bit.
packageOverrides = ps: with ps; rec {
# use the pre-built rocksdb.
# We seem to be unable to actually
# build rocksdb with mingw64/gcc7
# without producing a partial dud.
#
# Using the pre-built rocksdb, also
# means we do not need the gcc7 hack
# in our nixpkgs to allow mingw with
# libwinpthreads.
rocksdb = with ps.stdenv;
if hostPlatform.isWindows
then pkgs.callPackage ./rocksdb-prebuilt.nix { inherit (buildPackages) fetchurl unzip; }
else ps.rocksdb;

# on windows we have this habit of putting libraries
# into `bin`, wheras on unix it's usually `lib`. For
# this confuses nix easily. So we'll just move the
# .dll's from `bin` into `$out/lib`. Such that they
# are trivially found.
openssl = ps.openssl.overrideAttrs (drv: {
postInstall = with ps.stdenv; drv.postInstall + lib.optionalString hostPlatform.isWindows ''
cp $bin/bin/*.dll $out/lib/
'';
});
mfpr = ps.mfpr.overrideAttrs (drv: {
configureFlags = with ps.stdenv; (drv.configureFlags or []) ++ lib.optional hostPlatform.isWindows "--enable-static --disable-shared";
});
libmpc = ps.libmpc.overrideAttrs (drv: {
configureFlags = with ps.stdenv; (drv.configureFlags or []) ++ lib.optional hostPlatform.isWindows "--enable-static --disable-shared";
});

haskell = lib.recursiveUpdate ps.haskell {
compiler.ghc844 = (ps.haskell.compiler.ghc844.override {
ghcFlavour = if ps.stdenv.targetPlatform == ps.stdenv.hostPlatform
then "perf"
else "perf-cross-ncg";
enableShared = ps.stdenv.targetPlatform == ps.stdenv.hostPlatform;
enableIntegerSimple = false;
}).overrideAttrs (drv: {
dontStrip = true;
hardeningDisable = [ "stackprotector" "format" ];
patches = (drv.patches or []) ++ [
./patches/ghc/move-iserv-8.4.2.patch
./patches/ghc/hsc2hs-8.4.2.patch
./patches/ghc/various-8.4.2.patch
./patches/ghc/lowercase-8.4.2.patch
./patches/ghc/cabal-exe-ext-8.4.2.patch
./patches/ghc/dll-loader-8.4.2.patch
./patches/ghc/outputtable-assert-8.4.2.patch
./patches/ghc/0001-Stop-the-linker-panic.patch
./patches/ghc/ghc-8.4.3-Cabal2201-SMP-test-fix.patch
./patches/ghc/ghc-8.4.3-Cabal2201-no-hackage-tests.patch
./patches/ghc/ghc-8.4.3-Cabal2201-allow-test-wrapper.patch
./patches/ghc/ghc-8.4.3-Cabal2201-response-file-support.patch
# ./patches/ghc/ghc-8.4.4-darwin-rec-link.patch
];
postPatch = (drv.postPath or "") + ''
autoreconf
'';
});

compiler.ghc863 = (ps.haskell.compiler.ghc863.override {
ghcFlavour = if ps.stdenv.targetPlatform == ps.stdenv.hostPlatform
then "perf"
else "perf-cross-ncg";
enableShared = ps.stdenv.targetPlatform == ps.stdenv.hostPlatform;
enableIntegerSimple = false;
}).overrideAttrs (drv: {
dontStrip = true;
hardeningDisable = [ "stackprotector" "format" ];
patches = (drv.patches or []) ++ [
./patches/ghc/dll-loader-8.4.2.patch
./patches/ghc/0001-Stop-the-linker-panic.patch
./patches/ghc/ghc-8.4.3-Cabal2201-no-hackage-tests.patch
./patches/ghc/ghc-8.4.3-Cabal2201-allow-test-wrapper.patch
./patches/ghc/ghc-8.4.3-Cabal2201-response-file-support.patch
# ./patches/ghc/ghc-8.4.4-darwin-rec-link.patch
];
postPatch = (drv.postPath or "") + ''
autoreconf
'';
});
};
};
}
1 change: 0 additions & 1 deletion nix/iohk-common.nix
Expand Up @@ -18,5 +18,4 @@ import (
inherit (spec) sha256;
}) {
inherit system crossSystem config;
nixpkgsJsonOverride = ./nixpkgs-src.json;
}
8 changes: 4 additions & 4 deletions nix/iohk-nix-src.json
@@ -1,7 +1,7 @@
{
"url": "https://github.com/input-output-hk/iohk-nix",
"rev": "9dac27bd1d1db0977977e46f9ea490e818654658",
"date": "2019-01-18T15:15:01+01:00",
"sha256": "1622w9455286v8h8phi5j043iv3bk86xyy3fkzpasn2szw2707sv",
"rev": "cb501358f3e6dae322f23b8634e99db1e7bc23e4",
"date": "2019-01-21T13:05:03+01:00",
"sha256": "0sqm56fna05m2mjypywxj5jpsp1cq223dl1qmfjlqihl1gdarlbh",
"fetchSubmodules": false
}
}
7 changes: 0 additions & 7 deletions nix/nixpkgs-src.json

This file was deleted.

25 changes: 0 additions & 25 deletions nix/patches/double-conversion-2.0.2.0.patch

This file was deleted.

13 changes: 0 additions & 13 deletions nix/patches/ghc-8.0.2-darwin-rec-link.patch

This file was deleted.

122 changes: 0 additions & 122 deletions nix/patches/ghc/0001-Stop-the-linker-panic.patch

This file was deleted.

72 changes: 0 additions & 72 deletions nix/patches/ghc/Cabal2201-allow-test-wrapper.patch

This file was deleted.

15 changes: 0 additions & 15 deletions nix/patches/ghc/Cabal2201-no-hackage-tests.patch

This file was deleted.

0 comments on commit 48fed4c

Please sign in to comment.