Merge remote-tracking branch 'origin/master' into ios-with-xcode-11
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
{stdenv, fetchurl, ant, jre, jdk}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abcl";
|
||||
version = "1.5.0";
|
||||
version = "1.6.0";
|
||||
# or fetchFromGitHub(owner,repo,rev) or fetchgit(rev)
|
||||
src = fetchurl {
|
||||
url = "https://common-lisp.net/project/armedbear/releases/${version}/${pname}-src-${version}.tar.gz";
|
||||
sha256 = "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj";
|
||||
sha256 = "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9";
|
||||
};
|
||||
configurePhase = ''
|
||||
mkdir nix-tools
|
||||
|
||||
@@ -28,16 +28,13 @@ let cpuName = stdenv.hostPlatform.parsed.cpu.name;
|
||||
# Remove some broken manpages.
|
||||
rm -rf $out/Home/man/ja*
|
||||
|
||||
# for backward compatibility
|
||||
ln -s $out/Contents/Home $out/jre
|
||||
|
||||
ln -s $out/Contents/Home/* $out/
|
||||
|
||||
mkdir -p $out/nix-support
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
cat <<EOF >> $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ let result = stdenv.mkDerivation rec {
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
cat <<EOF >> "$out/nix-support/setup-hook"
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
||||
@@ -10,34 +10,34 @@
|
||||
"version": "11.0.4"
|
||||
},
|
||||
"armv6l": {
|
||||
"build": "7",
|
||||
"sha256": "3fbe418368e6d5888d0f15c4751139eb60d9785b864158a001386537fa46f67e",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_arm_linux_hotspot_11.0.3_7.tar.gz",
|
||||
"version": "11.0.3"
|
||||
"build": "10",
|
||||
"sha256": "c6b1fda3f8807028cbfcc34a4ded2e8a5a6b6239d2bcc1f06673ea6b1530df94",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_arm_linux_hotspot_11.0.5_10.tar.gz",
|
||||
"version": "11.0.5"
|
||||
},
|
||||
"armv7l": {
|
||||
"build": "7",
|
||||
"sha256": "3fbe418368e6d5888d0f15c4751139eb60d9785b864158a001386537fa46f67e",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_arm_linux_hotspot_11.0.3_7.tar.gz",
|
||||
"version": "11.0.3"
|
||||
"build": "10",
|
||||
"sha256": "c6b1fda3f8807028cbfcc34a4ded2e8a5a6b6239d2bcc1f06673ea6b1530df94",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_arm_linux_hotspot_11.0.5_10.tar.gz",
|
||||
"version": "11.0.5"
|
||||
},
|
||||
"packageType": "jdk",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
"build": "11",
|
||||
"sha256": "90c33cf3f2ed0bd773f648815de7347e69cfbb3416ef3bf41616ab1c4aa0f5a8",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz",
|
||||
"version": "11.0.4"
|
||||
"build": "10",
|
||||
"sha256": "6dd0c9c8a740e6c19149e98034fba8e368fd9aa16ab417aa636854d40db1a161",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.5_10.tar.gz",
|
||||
"version": "11.0.5"
|
||||
}
|
||||
},
|
||||
"openj9": {
|
||||
"packageType": "jdk",
|
||||
"vmType": "openj9",
|
||||
"x86_64": {
|
||||
"build": "11",
|
||||
"sha256": "b1099cccc80a3f434728c9bc3b8a90395793b625f4680ca05267cf635143d64d",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11_openj9-0.15.1/OpenJDK11U-jdk_x64_linux_openj9_11.0.4_11_openj9-0.15.1.tar.gz",
|
||||
"version": "11.0.4"
|
||||
"build": "10",
|
||||
"sha256": "6ead0515aecb24c6a8f5f3800a070b7d20a66c8f26cba5dad137824da590a532",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10_openj9-0.17.0/OpenJDK11U-jdk_x64_linux_openj9_11.0.5_10_openj9-0.17.0.tar.gz",
|
||||
"version": "11.0.5"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -52,20 +52,20 @@
|
||||
"packageType": "jre",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
"build": "11",
|
||||
"sha256": "70d2cc675155476f1d8516a7ae6729d44681e4fad5a6fc8dfa65cab36a67b7e0",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jre_x64_linux_hotspot_11.0.4_11.tar.gz",
|
||||
"version": "11.0.4"
|
||||
"build": "10",
|
||||
"sha256": "2f08c469c9a8adea1b6ee3444ba2a8242a7e99d87976a077faf037a9eb7f884b",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jre_x64_linux_hotspot_11.0.5_10.tar.gz",
|
||||
"version": "11.0.5"
|
||||
}
|
||||
},
|
||||
"openj9": {
|
||||
"packageType": "jre",
|
||||
"vmType": "openj9",
|
||||
"x86_64": {
|
||||
"build": "11",
|
||||
"sha256": "c2601e7cb22af7a910e03883280cee805074656104d6d3dcaaf30e3bbb832690",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11_openj9-0.15.1/OpenJDK11U-jre_x64_linux_openj9_11.0.4_11_openj9-0.15.1.tar.gz",
|
||||
"version": "11.0.4"
|
||||
"build": "10",
|
||||
"sha256": "2b68ea68d41281238a9dbe494cec762bd97fe34cf4fb6ba44ee1ce66bcec9d38",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10_openj9-0.17.0/OpenJDK11U-jre_x64_linux_openj9_11.0.5_10_openj9-0.17.0.tar.gz",
|
||||
"version": "11.0.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,20 +76,20 @@
|
||||
"packageType": "jdk",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
"build": "11",
|
||||
"sha256": "a50b211f475b9497311c9b65594764d7b852b1653f249582bb20fc3c302846a5",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_x64_mac_hotspot_11.0.4_11.tar.gz",
|
||||
"version": "11.0.4"
|
||||
"build": "10",
|
||||
"sha256": "0825d0d3177832320b697944cd8e7b2e7fe3893fafe8bfcf33ee3631aa5ca96b",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.5_10.tar.gz",
|
||||
"version": "11.0.5"
|
||||
}
|
||||
},
|
||||
"openj9": {
|
||||
"packageType": "jdk",
|
||||
"vmType": "openj9",
|
||||
"x86_64": {
|
||||
"build": "11",
|
||||
"sha256": "7c09678d9c2d9dd0366693c6ab27bed39c76a23e7ac69b8a25c794e99dcf3ba7",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11_openj9-0.15.1/OpenJDK11U-jdk_x64_mac_openj9_11.0.4_11_openj9-0.15.1.tar.gz",
|
||||
"version": "11.0.4"
|
||||
"build": "10",
|
||||
"sha256": "97dc8234b73e233316b5dfdca75af9a0d54aa23b1309b1a68fd0a5d2fa928e05",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10.1_openj9-0.17.0/OpenJDK11U-jdk_x64_mac_openj9_11.0.5_10_openj9-0.17.0.tar.gz",
|
||||
"version": "11.0.5"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -98,20 +98,20 @@
|
||||
"packageType": "jre",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
"build": "11",
|
||||
"sha256": "1647fded28d25e562811f7bce2092eb9c21d30608843b04250c023b40604ff26",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jre_x64_mac_hotspot_11.0.4_11.tar.gz",
|
||||
"version": "11.0.4"
|
||||
"build": "10",
|
||||
"sha256": "dfd212023321ebb41bce8cced15b4668001e86ecff6bffdd4f2591ccaae41566",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jre_x64_mac_hotspot_11.0.5_10.tar.gz",
|
||||
"version": "11.0.5"
|
||||
}
|
||||
},
|
||||
"openj9": {
|
||||
"packageType": "jre",
|
||||
"vmType": "openj9",
|
||||
"x86_64": {
|
||||
"build": "11",
|
||||
"sha256": "1a8e84bae517a848aa5f25c7b04f26ab3a3bfffaa7fdf9be24e1f83325e46766",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11_openj9-0.15.1/OpenJDK11U-jre_x64_mac_openj9_11.0.4_11_openj9-0.15.1.tar.gz",
|
||||
"version": "11.0.4"
|
||||
"build": "10",
|
||||
"sha256": "ea6bd0be4562e766c035b997447c059d10d5d2e58ca464c57f9078858da1c967",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10.1_openj9-0.17.0/OpenJDK11U-jre_x64_mac_openj9_11.0.5_10_openj9-0.17.0.tar.gz",
|
||||
"version": "11.0.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,56 +122,56 @@
|
||||
"jdk": {
|
||||
"hotspot": {
|
||||
"aarch64": {
|
||||
"build": "10",
|
||||
"sha256": "652776586ede124189dc218174b5922cc97feac81021ad81905900b349a352d2",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_aarch64_linux_hotspot_8u222b10.tar.gz",
|
||||
"version": "8.0.222"
|
||||
"build": "9",
|
||||
"sha256": "35799a2fd4b467115aff1bc3a54853b5131ba9068e53e1ab0fbe5521a3f2ba83",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u232b09.tar.gz",
|
||||
"version": "8.0.232"
|
||||
},
|
||||
"packageType": "jdk",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
"build": "10",
|
||||
"sha256": "37356281345b93feb4212e6267109b4409b55b06f107619dde4960e402bafa77",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz",
|
||||
"version": "8.0.222"
|
||||
"build": "9",
|
||||
"sha256": "7b7884f2eb2ba2d47f4c0bf3bb1a2a95b73a3a7734bd47ebf9798483a7bcc423",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u232b09.tar.gz",
|
||||
"version": "8.0.232"
|
||||
}
|
||||
},
|
||||
"openj9": {
|
||||
"packageType": "jdk",
|
||||
"vmType": "openj9",
|
||||
"x86_64": {
|
||||
"build": "10",
|
||||
"sha256": "20cff719c6de43f8bb58c7f59e251da7c1fa2207897c9a4768c8c669716dc819",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jdk_x64_linux_openj9_8u222b10_openj9-0.15.1.tar.gz",
|
||||
"version": "8.0.222"
|
||||
"build": "9",
|
||||
"sha256": "abea758c7e102f3c4a3be8757ee0ce039a70e2d498c160400dfb83c6f7004dbf",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09_openj9-0.17.0/OpenJDK8U-jdk_x64_linux_openj9_8u232b09_openj9-0.17.0.tar.gz",
|
||||
"version": "8.0.232"
|
||||
}
|
||||
}
|
||||
},
|
||||
"jre": {
|
||||
"hotspot": {
|
||||
"aarch64": {
|
||||
"build": "10",
|
||||
"sha256": "dfaf5a121f7606c54bd6232793677a4267eddf65d29cde352b84d84edbccbb51",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_aarch64_linux_hotspot_8u222b10.tar.gz",
|
||||
"version": "8.0.222"
|
||||
"build": "9",
|
||||
"sha256": "4540db665260fdc84ae2f191e21beec9168a70a4227718bee5edd317707e2fda",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_aarch64_linux_hotspot_8u232b09.tar.gz",
|
||||
"version": "8.0.232"
|
||||
},
|
||||
"packageType": "jre",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
"build": "10",
|
||||
"sha256": "a418ce895c8bf3ca2e7b2f423f038b8b093941684c9430f2e40da0982e12b52d",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_x64_linux_hotspot_8u222b10.tar.gz",
|
||||
"version": "8.0.222"
|
||||
"build": "9",
|
||||
"sha256": "bd06b84a1fc10e0a555431bc49a84e86df45de0be93c8ee4d09d13513219843b",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_x64_linux_hotspot_8u232b09.tar.gz",
|
||||
"version": "8.0.232"
|
||||
}
|
||||
},
|
||||
"openj9": {
|
||||
"packageType": "jre",
|
||||
"vmType": "openj9",
|
||||
"x86_64": {
|
||||
"build": "10",
|
||||
"sha256": "ae56994a7c8e8c19939c0c2ff8fe5a850eb2f23845c499aa5ede26deb3d5ad28",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jre_x64_linux_openj9_8u222b10_openj9-0.15.1.tar.gz",
|
||||
"version": "8.0.222"
|
||||
"build": "9",
|
||||
"sha256": "30bdfdb38901d4807d96a72a33b83f7a4f40255e11a88853c1e8732acc4644a7",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09_openj9-0.17.0/OpenJDK8U-jre_x64_linux_openj9_8u232b09_openj9-0.17.0.tar.gz",
|
||||
"version": "8.0.232"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,20 +182,20 @@
|
||||
"packageType": "jdk",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
"build": "10",
|
||||
"sha256": "9605fd00d2960934422437f601c7a9a1c5537309b9199d5bc75f84f20cd29a76",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_mac_hotspot_8u222b10.tar.gz",
|
||||
"version": "8.0.222"
|
||||
"build": "9",
|
||||
"sha256": "c237b2c2c32c893e4ee60cdac8c4bcc34ca731a5445986c03b95cf79918e40c3",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_x64_mac_hotspot_8u232b09.tar.gz",
|
||||
"version": "8.0.232"
|
||||
}
|
||||
},
|
||||
"openj9": {
|
||||
"packageType": "jdk",
|
||||
"vmType": "openj9",
|
||||
"x86_64": {
|
||||
"build": "10",
|
||||
"sha256": "df185e167756332163633a826b329db067f8a721f7d5d27f0b353a35fc415de0",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jdk_x64_mac_openj9_8u222b10_openj9-0.15.1.tar.gz",
|
||||
"version": "8.0.222"
|
||||
"build": "9",
|
||||
"sha256": "168079dcc20f62ac4409800c78d23a63ba7c665e58cd7ac8bde21ebbbb2b6d48",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09.1_openj9-0.17.0/OpenJDK8U-jdk_x64_mac_openj9_8u232b09_openj9-0.17.0.tar.gz",
|
||||
"version": "8.0.232"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -204,20 +204,20 @@
|
||||
"packageType": "jre",
|
||||
"vmType": "hotspot",
|
||||
"x86_64": {
|
||||
"build": "10",
|
||||
"sha256": "b3ac2436534cea932ccf665b317dbf5ffc0ee065efca808b22b6c2d795ca1b90",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_x64_mac_hotspot_8u222b10.tar.gz",
|
||||
"version": "8.0.222"
|
||||
"build": "9",
|
||||
"sha256": "5ec5f11dbc81ab65641b765e1ef2f924736c0d1cc797cb95b078598d9d863afd",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_x64_mac_hotspot_8u232b09.tar.gz",
|
||||
"version": "8.0.232"
|
||||
}
|
||||
},
|
||||
"openj9": {
|
||||
"packageType": "jre",
|
||||
"vmType": "openj9",
|
||||
"x86_64": {
|
||||
"build": "10",
|
||||
"sha256": "d5754413d7bc3a3233aaa7f8465451fbdabaf2a0c2a91743155bf135a3047ec8",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jre_x64_mac_openj9_8u222b10_openj9-0.15.1.tar.gz",
|
||||
"version": "8.0.222"
|
||||
"build": "9",
|
||||
"sha256": "60b70aa16c8ca38b96c305003f3d9871897555d0b4039b8e1f8db9ceeab16d53",
|
||||
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09.1_openj9-0.17.0/OpenJDK8U-jre_x64_mac_openj9_8u232b09_openj9-0.17.0.tar.gz",
|
||||
"version": "8.0.232"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@ stdenv.mkDerivation rec {
|
||||
based on the NetX project.
|
||||
'';
|
||||
homepage = https://github.com/adoptopenjdk/icedtea-web;
|
||||
maintainers = with stdenv.lib.maintainers; [ wizeman ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
{ stdenv, fetchFromGitHub, ninja, nodejs, python3 }:
|
||||
let
|
||||
version = "6.2.1";
|
||||
ocaml-version = "4.06.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "BuckleScript";
|
||||
repo = "bucklescript";
|
||||
rev = "${version}";
|
||||
sha256 = "0zx9nq7cik0c60n3rndqfqy3vdbj5lcrx6zcqcz2d60jjxi1z32y";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
ocaml = import ./ocaml.nix {
|
||||
bs-version = version;
|
||||
version = ocaml-version;
|
||||
inherit stdenv;
|
||||
src = "${src}/ocaml";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit src version;
|
||||
pname = "bs-platform";
|
||||
BS_RELEASE_BUILD = "true";
|
||||
buildInputs = [ nodejs python3 ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's:./configure.py --bootstrap:python3 ./configure.py --bootstrap:' ./scripts/install.js
|
||||
|
||||
mkdir -p ./native/${ocaml-version}/bin
|
||||
ln -sf ${ocaml}/bin/* ./native/${ocaml-version}/bin
|
||||
|
||||
rm -f vendor/ninja/snapshot/ninja.linux
|
||||
cp ${ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
node scripts/ninja.js config
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
node scripts/ninja.js build
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
node scripts/install.js
|
||||
|
||||
mkdir -p $out/bin
|
||||
|
||||
cp -rf jscomp lib vendor odoc_gen native $out
|
||||
cp bsconfig.json package.json $out
|
||||
|
||||
ln -s $out/lib/bsb $out/bin/bsb
|
||||
ln -s $out/lib/bsc $out/bin/bsc
|
||||
ln -s $out/lib/bsrefmt $out/bin/bsrefmt
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ stdenv, fetchFromGitHub, ninja, nodejs, python3, ... }:
|
||||
let
|
||||
meta = with stdenv.lib; {
|
||||
description = "A JavaScript backend for OCaml focused on smooth integration and clean generated code.";
|
||||
homepage = https://bucklescript.github.io;
|
||||
license = licenses.lgpl3;
|
||||
maintainers = with maintainers; [ turbomack gamb ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
in
|
||||
{
|
||||
bs-platform-621 = import ./bs-platform-62.nix {
|
||||
inherit stdenv fetchFromGitHub ninja nodejs python3;
|
||||
} // { inherit meta; };
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{ stdenv, src, version, bs-version }:
|
||||
stdenv.mkDerivation rec {
|
||||
inherit src version;
|
||||
name = "ocaml-${version}+bs-${bs-version}";
|
||||
configurePhase = ''
|
||||
./configure -prefix $out
|
||||
'';
|
||||
buildPhase = ''
|
||||
make -j9 world.opt
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
branch = "4.06";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
@@ -1,21 +1,22 @@
|
||||
{ stdenv, fetchFromGitHub, makeWrapper, clang, haskellPackages }:
|
||||
|
||||
haskellPackages.mkDerivation {
|
||||
haskellPackages.mkDerivation rec {
|
||||
|
||||
pname = "carp";
|
||||
version = "unstable-2018-09-15";
|
||||
version = "0.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "carp-lang";
|
||||
repo = "Carp";
|
||||
rev = "cf9286c35cab1c170aa819f7b30b5871b9e812e6";
|
||||
sha256 = "1k6kdxbbaclhi40b9p3fgbkc1x6pc4v0029xjm6gny6pcdci2cli";
|
||||
rev = "v${version}";
|
||||
sha256 = "07yk3gy4l6h3k7sh8al7lgwk75a13zxwfp7siqpb5gnnqr1z3brc";
|
||||
};
|
||||
|
||||
buildDepends = [ makeWrapper ];
|
||||
|
||||
executableHaskellDepends = with haskellPackages; [
|
||||
HUnit blaze-markup blaze-html split cmdargs
|
||||
HUnit blaze-markup blaze-html split cmdargs ansi-terminal cmark
|
||||
edit-distance
|
||||
];
|
||||
|
||||
isExecutable = true;
|
||||
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=format-truncation";
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isGNU "-Wno-error=format-truncation";
|
||||
|
||||
/*
|
||||
** We patch out a very annoying 'feature' in ./configure, which
|
||||
|
||||
@@ -63,7 +63,7 @@ stdenv.mkDerivation {
|
||||
meta = {
|
||||
homepage = http://www.call-cc.org/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ the-kenny ];
|
||||
maintainers = with stdenv.lib.maintainers; [ the-kenny corngood ];
|
||||
platforms = stdenv.lib.platforms.linux; # Maybe other non-darwin Unix
|
||||
description = "A portable compiler for the Scheme programming language";
|
||||
longDescription = ''
|
||||
|
||||
@@ -22,6 +22,6 @@ eggDerivation {
|
||||
homepage = https://github.com/the-kenny/egg2nix;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = [ stdenv.lib.maintainers.the-kenny ];
|
||||
maintainers = with stdenv.lib.maintainers; [ the-kenny corngood ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
let
|
||||
libPath = "${chicken}/var/lib/chicken/${toString chicken.binaryVersion}/";
|
||||
overrides = import ./overrides.nix;
|
||||
baseName = lib.getName name;
|
||||
baseName = stdenv.lib.getName name;
|
||||
override = if builtins.hasAttr baseName overrides
|
||||
then
|
||||
builtins.getAttr baseName overrides
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs }:
|
||||
{ pkgs, stdenv }:
|
||||
rec {
|
||||
inherit (pkgs) eggDerivation fetchegg;
|
||||
|
||||
@@ -16,35 +16,6 @@ rec {
|
||||
];
|
||||
};
|
||||
|
||||
blob-utils = eggDerivation {
|
||||
name = "blob-utils-1.0.3";
|
||||
|
||||
src = fetchegg {
|
||||
name = "blob-utils";
|
||||
version = "1.0.3";
|
||||
sha256 = "17vdn02fnxnjx5ixgqimln93lqvzyq4y9w02fw7xnbdcjzqm0xml";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
setup-helper
|
||||
string-utils
|
||||
];
|
||||
};
|
||||
|
||||
check-errors = eggDerivation {
|
||||
name = "check-errors-1.13.0";
|
||||
|
||||
src = fetchegg {
|
||||
name = "check-errors";
|
||||
version = "1.13.0";
|
||||
sha256 = "12a0sn82n98jybh72zb39fdddmr5k4785xglxb16750fhy8rmjwi";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
setup-helper
|
||||
];
|
||||
};
|
||||
|
||||
defstruct = eggDerivation {
|
||||
name = "defstruct-1.6";
|
||||
|
||||
@@ -60,31 +31,29 @@ rec {
|
||||
};
|
||||
|
||||
http-client = eggDerivation {
|
||||
name = "http-client-0.7.1";
|
||||
name = "http-client-0.18";
|
||||
|
||||
src = fetchegg {
|
||||
name = "http-client";
|
||||
version = "0.7.1";
|
||||
sha256 = "1s03zgmb7kb99ld0f2ylqgicrab9qgza53fkgsqvg7bh5njmzhxr";
|
||||
version = "0.18";
|
||||
sha256 = "1b9x66kfcglld4xhm06vba00gw37vr07c859kj7lmwnk9nwhcplg";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
intarweb
|
||||
uri-common
|
||||
message-digest
|
||||
md5
|
||||
string-utils
|
||||
simple-md5
|
||||
sendfile
|
||||
];
|
||||
};
|
||||
|
||||
intarweb = eggDerivation {
|
||||
name = "intarweb-1.3";
|
||||
name = "intarweb-1.7";
|
||||
|
||||
src = fetchegg {
|
||||
name = "intarweb";
|
||||
version = "1.3";
|
||||
sha256 = "0izlby78c25py29bdcbc0vapb6h7xgchqrzi6i51d0rb3mnwy88h";
|
||||
version = "1.7";
|
||||
sha256 = "1arjgn5g4jfdzj3nlrhxk235qwf6k6jxr14yhnncnfbgdb820xp8";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
@@ -94,92 +63,13 @@ rec {
|
||||
];
|
||||
};
|
||||
|
||||
lookup-table = eggDerivation {
|
||||
name = "lookup-table-1.13.5";
|
||||
|
||||
src = fetchegg {
|
||||
name = "lookup-table";
|
||||
version = "1.13.5";
|
||||
sha256 = "1nzly6rhynawlvzlyilk8z8cxz57cf9n5iv20glkhh28pz2izmrb";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
setup-helper
|
||||
check-errors
|
||||
miscmacros
|
||||
record-variants
|
||||
synch
|
||||
];
|
||||
};
|
||||
|
||||
matchable = eggDerivation {
|
||||
name = "matchable-3.3";
|
||||
name = "matchable-3.7";
|
||||
|
||||
src = fetchegg {
|
||||
name = "matchable";
|
||||
version = "3.3";
|
||||
sha256 = "07y3lpzgm4djiwi9y2adc796f9kwkmdr28fkfkw65syahdax8990";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
md5 = eggDerivation {
|
||||
name = "md5-3.1.0";
|
||||
|
||||
src = fetchegg {
|
||||
name = "md5";
|
||||
version = "3.1.0";
|
||||
sha256 = "0bka43nx8x9b0b079qpvml2fl20km19ny0qjmhwzlh6rwmzazj2a";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
message-digest
|
||||
];
|
||||
};
|
||||
|
||||
message-digest = eggDerivation {
|
||||
name = "message-digest-3.1.0";
|
||||
|
||||
src = fetchegg {
|
||||
name = "message-digest";
|
||||
version = "3.1.0";
|
||||
sha256 = "1w6bax19dwgih78vcimiws0rja7qsd8hmbm6qqg2hf9cw3vab21s";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
setup-helper
|
||||
miscmacros
|
||||
check-errors
|
||||
variable-item
|
||||
blob-utils
|
||||
string-utils
|
||||
];
|
||||
};
|
||||
|
||||
miscmacros = eggDerivation {
|
||||
name = "miscmacros-2.96";
|
||||
|
||||
src = fetchegg {
|
||||
name = "miscmacros";
|
||||
version = "2.96";
|
||||
sha256 = "1ajdgjrni10i2hmhcp4rawnxajjxry3kmq1krdmah4sf0kjrgajc";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
record-variants = eggDerivation {
|
||||
name = "record-variants-0.5.1";
|
||||
|
||||
src = fetchegg {
|
||||
name = "record-variants";
|
||||
version = "0.5.1";
|
||||
sha256 = "15wgysxkm8m4hx9nhhw9akchzipdnqc7yj3qd3zn0z7sxg4sld1h";
|
||||
version = "3.7";
|
||||
sha256 = "1vc9rpb44fhn0n91hzglin986dw9zj87fikvfrd7j308z22a41yh";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
@@ -188,12 +78,12 @@ rec {
|
||||
};
|
||||
|
||||
sendfile = eggDerivation {
|
||||
name = "sendfile-1.7.29";
|
||||
name = "sendfile-1.8.3";
|
||||
|
||||
src = fetchegg {
|
||||
name = "sendfile";
|
||||
version = "1.7.29";
|
||||
sha256 = "1dc02cbkx5kixhbqjy26g6gs680vy7krc9qis1p1v4aa0b2lgj7k";
|
||||
version = "1.8.3";
|
||||
sha256 = "036x4xdndx7qly94afnag5b9idd1yymdm8d832w2cy054y7lxqsi";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
@@ -201,13 +91,13 @@ rec {
|
||||
];
|
||||
};
|
||||
|
||||
setup-helper = eggDerivation {
|
||||
name = "setup-helper-1.5.4";
|
||||
simple-md5 = eggDerivation {
|
||||
name = "simple-md5-0.0.1";
|
||||
|
||||
src = fetchegg {
|
||||
name = "setup-helper";
|
||||
version = "1.5.4";
|
||||
sha256 = "1k644y0md2isdcvazqfm4nyc8rh3dby6b0j3r4na4w8ryspqp6gj";
|
||||
name = "simple-md5";
|
||||
version = "0.0.1";
|
||||
sha256 = "1h0b51p9wl1dl3pzs39hdq3hk2qnjgn8n750bgmh0651g4lzmq3i";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
@@ -215,38 +105,6 @@ rec {
|
||||
];
|
||||
};
|
||||
|
||||
string-utils = eggDerivation {
|
||||
name = "string-utils-1.2.4";
|
||||
|
||||
src = fetchegg {
|
||||
name = "string-utils";
|
||||
version = "1.2.4";
|
||||
sha256 = "07alvghg0dahilrm4jg44bndl0x69sv1zbna9l20cbdvi35i0jp1";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
setup-helper
|
||||
miscmacros
|
||||
lookup-table
|
||||
check-errors
|
||||
];
|
||||
};
|
||||
|
||||
synch = eggDerivation {
|
||||
name = "synch-2.1.2";
|
||||
|
||||
src = fetchegg {
|
||||
name = "synch";
|
||||
version = "2.1.2";
|
||||
sha256 = "1m9mnbq0m5jsxmd1a3rqpwpxj0l1b7vn1fknvxycc047pmlcyl00";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
setup-helper
|
||||
check-errors
|
||||
];
|
||||
};
|
||||
|
||||
uri-common = eggDerivation {
|
||||
name = "uri-common-1.4";
|
||||
|
||||
@@ -264,32 +122,16 @@ rec {
|
||||
};
|
||||
|
||||
uri-generic = eggDerivation {
|
||||
name = "uri-generic-2.41";
|
||||
name = "uri-generic-2.46";
|
||||
|
||||
src = fetchegg {
|
||||
name = "uri-generic";
|
||||
version = "2.41";
|
||||
sha256 = "1r5jbzjllbnmhm5n0m3fcx0g6dc2c2jzp1dcndkfmxz0cl99zxac";
|
||||
version = "2.46";
|
||||
sha256 = "10ivf4xlmr6jcm00l2phq1y73hjv6g3qgr38ycc8rw56wv6sbm4g";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
matchable
|
||||
defstruct
|
||||
];
|
||||
};
|
||||
|
||||
variable-item = eggDerivation {
|
||||
name = "variable-item-1.3.1";
|
||||
|
||||
src = fetchegg {
|
||||
name = "variable-item";
|
||||
version = "1.3.1";
|
||||
sha256 = "19b3mhb8kr892sz9yyzq79l0vv28dgilw9cf415kj6aq16yp4d5n";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
setup-helper
|
||||
check-errors
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
addChickenRepositoryPath() {
|
||||
addToSearchPathWithCustomDelimiter : CHICKEN_REPOSITORY_EXTRA "$1/lib/chicken/8/"
|
||||
# addToSearchPathWithCustomDelimiter \; CHICKEN_INCLUDE_PATH "$1/share/"
|
||||
export CHICKEN_INCLUDE_PATH="$1/share;$CHICKEN_INCLUDE_PATH"
|
||||
export CHICKEN_INCLUDE_PATH="$1/share${CHICKEN_INCLUDE_PATH:+;$CHICKEN_INCLUDE_PATH}"
|
||||
}
|
||||
|
||||
addEnvHooks "$targetOffset" addChickenRepositoryPath
|
||||
|
||||
@@ -45,7 +45,7 @@ stdenv.mkDerivation {
|
||||
meta = {
|
||||
homepage = http://www.call-cc.org/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ the-kenny ];
|
||||
maintainers = with stdenv.lib.maintainers; [ the-kenny corngood ];
|
||||
platforms = stdenv.lib.platforms.linux; # Maybe other non-darwin Unix
|
||||
description = "A portable compiler for the Scheme programming language";
|
||||
longDescription = ''
|
||||
|
||||
@@ -24,6 +24,6 @@ eggDerivation {
|
||||
homepage = https://github.com/the-kenny/egg2nix;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = [ stdenv.lib.maintainers.the-kenny ];
|
||||
maintainers = with stdenv.lib.maintainers; [ the-kenny corngood ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
let
|
||||
overrides = import ./overrides.nix;
|
||||
baseName = (builtins.parseDrvName name).name;
|
||||
baseName = stdenv.lib.getName name;
|
||||
override = if builtins.hasAttr baseName overrides
|
||||
then
|
||||
builtins.getAttr baseName overrides
|
||||
|
||||
@@ -47,12 +47,12 @@ rec {
|
||||
};
|
||||
|
||||
srfi-13 = eggDerivation {
|
||||
name = "srfi-13-0.2.1";
|
||||
name = "srfi-13-0.3";
|
||||
|
||||
src = fetchegg {
|
||||
name = "srfi-13";
|
||||
version = "0.2.1";
|
||||
sha256 = "0204i7fhc4dy0l89lbi2lv9cjndrvwyrk68z3wy7x445jb4ky1gq";
|
||||
version = "0.3";
|
||||
sha256 = "0yaw9i6zhpxl1794pirh168clprjgmsb0xlr96drirjzsslgm3zp";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "closure-compiler";
|
||||
version = "20190215";
|
||||
version = "20190909";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
|
||||
sha256 = "16rpl7x90ganpxlz6v9292cwx7dnkhklqx1nn161yj7ypf9bzd4k";
|
||||
sha256 = "0km45pz19dz1hi8vjj290hyxdhr379iixmml0rs8crr4gvs3685w";
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
}:
|
||||
|
||||
assert lib.versionAtLeast ocamlPackages.ocaml.version "4.02";
|
||||
assert lib.versionAtLeast coq.coq-version "8.6.1";
|
||||
assert lib.versionAtLeast coq.coq-version "8.8.0";
|
||||
|
||||
let
|
||||
ocaml-pkgs = with ocamlPackages; [ ocaml findlib menhir ];
|
||||
@@ -12,13 +12,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "compcert";
|
||||
version = "3.5";
|
||||
version = "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AbsInt";
|
||||
repo = "CompCert";
|
||||
rev = "v${version}";
|
||||
sha256 = "1g8067a5x3vd0l47d04gjvy5yx49nghh55am5d1fbrjirfsnsz8j";
|
||||
sha256 = "1k9xhj7fgllhf7bn7rp3w6zfvs4clglnc4w39zp4678hrwvdcpha";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
@@ -27,7 +27,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace ./configure \
|
||||
--replace '|8.9.0' '|8.9.0|8.9.1' \
|
||||
--replace '{toolprefix}gcc' '{toolprefix}cc'
|
||||
'';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ stdenv, lib, fetchFromGitHub, fetchurl, makeWrapper
|
||||
, coreutils, git, gmp, nettools, openssl_1_0_2, readline, tzdata, libxml2, libyaml
|
||||
, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib
|
||||
, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib, pkgconfig
|
||||
, callPackage }:
|
||||
|
||||
# We need multiple binaries as a given binary isn't always able to build
|
||||
@@ -38,8 +38,14 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
generic = { version, sha256, binary, doCheck ? true }:
|
||||
let compiler = stdenv.mkDerivation rec {
|
||||
commonBuildInputs = extraBuildInputs: [
|
||||
boehmgc libatomic_ops pcre libevent libyaml zlib libxml2 openssl_1_0_2
|
||||
] ++ extraBuildInputs
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
|
||||
generic = ({ version, sha256, binary, doCheck ? true, extraBuildInputs ? [] }:
|
||||
lib.fix (compiler: stdenv.mkDerivation {
|
||||
pname = "crystal";
|
||||
inherit doCheck version;
|
||||
|
||||
@@ -50,6 +56,8 @@ let
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
outputs = [ "out" "lib" "bin" ];
|
||||
|
||||
# we are almost able to run the full test suite now
|
||||
postPatch = ''
|
||||
substituteInPlace src/crystal/system/unix/time.cr \
|
||||
@@ -72,14 +80,9 @@ let
|
||||
--replace '`hostname`' '`${nettools}/bin/hostname`'
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
boehmgc libatomic_ops pcre libevent libyaml
|
||||
llvm zlib openssl_1_0_2
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
libiconv
|
||||
];
|
||||
buildInputs = commonBuildInputs extraBuildInputs;
|
||||
|
||||
nativeBuildInputs = [ binary makeWrapper which ];
|
||||
nativeBuildInputs = [ binary makeWrapper which pkgconfig llvm ];
|
||||
|
||||
makeFlags = [
|
||||
"CRYSTAL_CONFIG_VERSION=${version}"
|
||||
@@ -91,22 +94,27 @@ let
|
||||
|
||||
FLAGS = [
|
||||
"--release"
|
||||
"--no-debug"
|
||||
"--single-module" # needed for deterministic builds
|
||||
];
|
||||
|
||||
# This makes sure we don't keep depending on the previous version of
|
||||
# crystal used to build this one.
|
||||
CRYSTAL_LIBRARY_PATH = "${placeholder "lib"}/crystal";
|
||||
|
||||
# We *have* to add `which` to the PATH or crystal is unable to build stuff
|
||||
# later if which is not available.
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 .build/crystal $out/bin/crystal
|
||||
wrapProgram $out/bin/crystal \
|
||||
--suffix PATH : ${lib.makeBinPath [ clang which ]} \
|
||||
--suffix CRYSTAL_PATH : lib:$out/lib/crystal \
|
||||
--suffix LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}
|
||||
install -dm755 $out/lib/crystal
|
||||
cp -r src/* $out/lib/crystal/
|
||||
install -Dm755 .build/crystal $bin/bin/crystal
|
||||
wrapProgram $bin/bin/crystal \
|
||||
--suffix PATH : ${lib.makeBinPath [ pkgconfig clang which ]} \
|
||||
--suffix CRYSTAL_PATH : lib:$lib/crystal \
|
||||
--suffix CRYSTAL_LIBRARY_PATH : ${
|
||||
lib.makeLibraryPath (commonBuildInputs extraBuildInputs)
|
||||
}
|
||||
install -dm755 $lib/crystal
|
||||
cp -r src/* $lib/crystal/
|
||||
|
||||
install -dm755 $out/share/doc/crystal/api
|
||||
cp -r docs/* $out/share/doc/crystal/api/
|
||||
@@ -119,6 +127,10 @@ let
|
||||
|
||||
install -Dm644 -t $out/share/licenses/crystal LICENSE README.md
|
||||
|
||||
mkdir -p $out
|
||||
ln -s $bin/bin $out/bin
|
||||
ln -s $lib $out/lib
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
@@ -147,7 +159,7 @@ let
|
||||
maintainers = with maintainers; [ manveru david50407 peterhoeg ];
|
||||
platforms = builtins.attrNames archs;
|
||||
};
|
||||
}; in compiler;
|
||||
}));
|
||||
|
||||
in rec {
|
||||
binaryCrystal_0_26 = genericBinary {
|
||||
@@ -212,7 +224,22 @@ in rec {
|
||||
binary = binaryCrystal_0_29;
|
||||
};
|
||||
|
||||
crystal = crystal_0_30;
|
||||
crystal_0_31 = generic {
|
||||
version = "0.31.1";
|
||||
sha256 = "1dswxa32w16gnc6yjym12xj7ibg0g6zk3ngvl76lwdjqb1h6lwz8";
|
||||
doCheck = false; # 5 checks are failing now
|
||||
binary = crystal_0_30;
|
||||
};
|
||||
|
||||
crystal_0_32 = generic {
|
||||
version = "255bfc5fa925b95b72e34b26ad997fb2b3f83059";
|
||||
sha256 = "1dgk36cj5lwhs1c4zp0s1c9hjk0h3vljq6zwhlnzkl1xs7cgzim1";
|
||||
doCheck = false; # 5 checks are failing now
|
||||
binary = crystal_0_31;
|
||||
extraBuildInputs = [ readline ];
|
||||
};
|
||||
|
||||
crystal = crystal_0_31;
|
||||
|
||||
crystal2nix = callPackage ./crystal2nix.nix {};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
args@
|
||||
{ version
|
||||
, sha256
|
||||
, url ? ""
|
||||
, name ? ""
|
||||
, developerProgram ? false
|
||||
, runPatches ? []
|
||||
, addOpenGLRunpath
|
||||
, alsaLib
|
||||
, expat
|
||||
, fetchurl
|
||||
, fontconfig
|
||||
, freetype
|
||||
, gcc
|
||||
, gdk-pixbuf
|
||||
, glib
|
||||
, glibc
|
||||
, gtk2
|
||||
, lib
|
||||
, makeWrapper
|
||||
, ncurses5
|
||||
, perl
|
||||
, python27
|
||||
, requireFile
|
||||
, stdenv
|
||||
, unixODBC
|
||||
, xorg
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cudatoolkit";
|
||||
inherit version runPatches;
|
||||
|
||||
dontPatchELF = true;
|
||||
dontStrip = true;
|
||||
|
||||
src =
|
||||
if developerProgram then
|
||||
requireFile {
|
||||
message = ''
|
||||
This nix expression requires that ${args.name} is already part of the store.
|
||||
Register yourself to NVIDIA Accelerated Computing Developer Program, retrieve the CUDA toolkit
|
||||
at https://developer.nvidia.com/cuda-toolkit, and run the following command in the download directory:
|
||||
nix-prefetch-url file://\$PWD/${args.name}
|
||||
'';
|
||||
inherit (args) name sha256;
|
||||
}
|
||||
else
|
||||
fetchurl {
|
||||
inherit (args) url sha256;
|
||||
};
|
||||
|
||||
outputs = [ "out" "lib" "doc" ];
|
||||
|
||||
nativeBuildInputs = [ perl makeWrapper addOpenGLRunpath ];
|
||||
buildInputs = [ gdk-pixbuf ]; # To get $GDK_PIXBUF_MODULE_FILE via setup-hook
|
||||
runtimeDependencies = [
|
||||
ncurses5 expat python27 zlib glibc
|
||||
xorg.libX11 xorg.libXext xorg.libXrender xorg.libXt xorg.libXtst xorg.libXi xorg.libXext
|
||||
gtk2 glib fontconfig freetype unixODBC alsaLib
|
||||
];
|
||||
|
||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc.lib}/lib64";
|
||||
|
||||
unpackPhase = ''
|
||||
sh $src --keep --noexec
|
||||
|
||||
${lib.optionalString (lib.versionOlder version "10.1") ''
|
||||
cd pkg/run_files
|
||||
sh cuda-linux*.run --keep --noexec
|
||||
sh cuda-samples*.run --keep --noexec
|
||||
mv pkg ../../$(basename $src)
|
||||
cd ../..
|
||||
rm -rf pkg
|
||||
|
||||
for patch in $runPatches; do
|
||||
sh $patch --keep --noexec
|
||||
mv pkg $(basename $patch)
|
||||
done
|
||||
''}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir $out
|
||||
${lib.optionalString (lib.versionOlder version "10.1") ''
|
||||
cd $(basename $src)
|
||||
export PERL5LIB=.
|
||||
perl ./install-linux.pl --prefix="$out"
|
||||
cd ..
|
||||
for patch in $runPatches; do
|
||||
cd $(basename $patch)
|
||||
perl ./install_patch.pl --silent --accept-eula --installdir="$out"
|
||||
cd ..
|
||||
done
|
||||
''}
|
||||
${lib.optionalString (lib.versionAtLeast version "10.1") ''
|
||||
cd pkg/builds/cuda-toolkit
|
||||
mv * $out/
|
||||
''}
|
||||
|
||||
rm $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why?
|
||||
|
||||
${lib.optionalString (lib.versionOlder version "10.1") ''
|
||||
# let's remove the 32-bit libraries, they confuse the lib64->lib mover
|
||||
rm -rf $out/lib
|
||||
''}
|
||||
|
||||
# Remove some cruft.
|
||||
${lib.optionalString ((lib.versionAtLeast version "7.0") && (lib.versionOlder version "10.1"))
|
||||
"rm $out/bin/uninstall*"}
|
||||
|
||||
# Fixup path to samples (needed for cuda 6.5 or else nsight will not find them)
|
||||
if [ -d "$out"/cuda-samples ]; then
|
||||
mv "$out"/cuda-samples "$out"/samples
|
||||
fi
|
||||
|
||||
# Change the #error on GCC > 4.9 to a #warning.
|
||||
sed -i $out/include/host_config.h -e 's/#error\(.*unsupported GNU version\)/#warning\1/'
|
||||
|
||||
# Fix builds with newer glibc version
|
||||
sed -i "1 i#define _BITS_FLOATN_H" "$out/include/host_defines.h"
|
||||
|
||||
# Ensure that cmake can find CUDA.
|
||||
mkdir -p $out/nix-support
|
||||
echo "cmakeFlags+=' -DCUDA_TOOLKIT_ROOT_DIR=$out'" >> $out/nix-support/setup-hook
|
||||
|
||||
# Move some libraries to the lib output so that programs that
|
||||
# depend on them don't pull in this entire monstrosity.
|
||||
mkdir -p $lib/lib
|
||||
mv -v $out/lib64/libcudart* $lib/lib/
|
||||
|
||||
# Remove OpenCL libraries as they are provided by ocl-icd and driver.
|
||||
rm -f $out/lib64/libOpenCL*
|
||||
${lib.optionalString (lib.versionAtLeast version "10.1") ''
|
||||
mv $out/lib64 $out/lib
|
||||
''}
|
||||
|
||||
# Set compiler for NVCC.
|
||||
wrapProgram $out/bin/nvcc \
|
||||
--prefix PATH : ${gcc}/bin
|
||||
|
||||
# nvprof do not find any program to profile if LD_LIBRARY_PATH is not set
|
||||
wrapProgram $out/bin/nvprof \
|
||||
--prefix LD_LIBRARY_PATH : $out/lib
|
||||
'' + lib.optionalString (lib.versionOlder version "8.0") ''
|
||||
# Hack to fix building against recent Glibc/GCC.
|
||||
echo "NIX_CFLAGS_COMPILE+=' -D_FORCE_INLINES'" >> $out/nix-support/setup-hook
|
||||
'' + ''
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
for b in nvvp nsight; do
|
||||
wrapProgram "$out/bin/$b" \
|
||||
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
|
||||
done
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
while IFS= read -r -d ''$'\0' i; do
|
||||
if ! isELF "$i"; then continue; fi
|
||||
echo "patching $i..."
|
||||
if [[ ! $i =~ \.so ]]; then
|
||||
patchelf \
|
||||
--set-interpreter "''$(cat $NIX_CC/nix-support/dynamic-linker)" $i
|
||||
fi
|
||||
if [[ $i =~ libcudart ]]; then
|
||||
rpath2=
|
||||
else
|
||||
rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64
|
||||
fi
|
||||
patchelf --set-rpath "$rpath2" --force-rpath $i
|
||||
done < <(find $out $lib $doc -type f -print0)
|
||||
'';
|
||||
|
||||
# Set RPATH so that libcuda and other libraries in
|
||||
# /run/opengl-driver(-32)/lib can be found. See the explanation in
|
||||
# addOpenGLRunpath. Don't try to figure out which libraries really need
|
||||
# it, just patch all (but not the stubs libraries). Note that
|
||||
# --force-rpath prevents changing RPATH (set above) to RUNPATH.
|
||||
postFixup = ''
|
||||
addOpenGLRunpath --force-rpath {$out,$lib}/lib/lib*.so
|
||||
'';
|
||||
|
||||
# cuda-gdb doesn't run correctly when not using sandboxing, so
|
||||
# temporarily disabling the install check. This should be set to true
|
||||
# when we figure out how to get `cuda-gdb --version` to run correctly
|
||||
# when not using sandboxing.
|
||||
doInstallCheck = false;
|
||||
postInstallCheck = let
|
||||
in ''
|
||||
# Smoke test binaries
|
||||
pushd $out/bin
|
||||
for f in *; do
|
||||
case $f in
|
||||
crt) continue;;
|
||||
nvcc.profile) continue;;
|
||||
nsight_ee_plugins_manage.sh) continue;;
|
||||
uninstall_cuda_toolkit_6.5.pl) continue;;
|
||||
computeprof|nvvp|nsight) continue;; # GUIs don't feature "--version"
|
||||
*) echo "Executing '$f --version':"; ./$f --version;;
|
||||
esac
|
||||
done
|
||||
popd
|
||||
'';
|
||||
passthru = {
|
||||
cc = gcc;
|
||||
majorVersion = lib.versions.majorMinor version;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A compiler for NVIDIA GPUs, math libraries, and tools";
|
||||
homepage = "https://developer.nvidia.com/cuda-toolkit";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
license = licenses.unfree;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,198 +1,15 @@
|
||||
{ lib, stdenv, makeWrapper, fetchurl, requireFile, perl, ncurses5, expat, python27, zlib
|
||||
, gcc48, gcc49, gcc5, gcc6, gcc7
|
||||
, xorg, gtk2, gdk-pixbuf, glib, fontconfig, freetype, unixODBC, alsaLib, glibc
|
||||
, addOpenGLRunpath
|
||||
{ lib
|
||||
, callPackage
|
||||
, fetchurl
|
||||
, gcc48
|
||||
, gcc49
|
||||
, gcc5
|
||||
, gcc6
|
||||
, gcc7
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
common =
|
||||
args@{ gcc, version, sha256
|
||||
, url ? ""
|
||||
, name ? ""
|
||||
, developerProgram ? false
|
||||
, python ? python27
|
||||
, runPatches ? []
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cudatoolkit";
|
||||
inherit version runPatches;
|
||||
|
||||
dontPatchELF = true;
|
||||
dontStrip = true;
|
||||
|
||||
src =
|
||||
if developerProgram then
|
||||
requireFile {
|
||||
message = ''
|
||||
This nix expression requires that ${args.name} is already part of the store.
|
||||
Register yourself to NVIDIA Accelerated Computing Developer Program, retrieve the CUDA toolkit
|
||||
at https://developer.nvidia.com/cuda-toolkit, and run the following command in the download directory:
|
||||
nix-prefetch-url file://\$PWD/${args.name}
|
||||
'';
|
||||
inherit (args) name sha256;
|
||||
}
|
||||
else
|
||||
fetchurl {
|
||||
inherit (args) url sha256;
|
||||
};
|
||||
|
||||
outputs = [ "out" "lib" "doc" ];
|
||||
|
||||
nativeBuildInputs = [ perl makeWrapper addOpenGLRunpath ];
|
||||
buildInputs = [ gdk-pixbuf ]; # To get $GDK_PIXBUF_MODULE_FILE via setup-hook
|
||||
runtimeDependencies = [
|
||||
ncurses5 expat python zlib glibc
|
||||
xorg.libX11 xorg.libXext xorg.libXrender xorg.libXt xorg.libXtst xorg.libXi xorg.libXext
|
||||
gtk2 glib fontconfig freetype unixODBC alsaLib
|
||||
];
|
||||
|
||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc.lib}/lib64";
|
||||
|
||||
unpackPhase = ''
|
||||
sh $src --keep --noexec
|
||||
|
||||
cd pkg/run_files
|
||||
sh cuda-linux*.run --keep --noexec
|
||||
sh cuda-samples*.run --keep --noexec
|
||||
mv pkg ../../$(basename $src)
|
||||
cd ../..
|
||||
rm -rf pkg
|
||||
|
||||
for patch in $runPatches; do
|
||||
sh $patch --keep --noexec
|
||||
mv pkg $(basename $patch)
|
||||
done
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir $out
|
||||
cd $(basename $src)
|
||||
export PERL5LIB=.
|
||||
perl ./install-linux.pl --prefix="$out"
|
||||
cd ..
|
||||
for patch in $runPatches; do
|
||||
cd $(basename $patch)
|
||||
perl ./install_patch.pl --silent --accept-eula --installdir="$out"
|
||||
cd ..
|
||||
done
|
||||
|
||||
rm $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why?
|
||||
|
||||
# let's remove the 32-bit libraries, they confuse the lib64->lib mover
|
||||
rm -rf $out/lib
|
||||
|
||||
# Remove some cruft.
|
||||
${lib.optionalString (lib.versionAtLeast version "7.0") "rm $out/bin/uninstall*"}
|
||||
|
||||
# Fixup path to samples (needed for cuda 6.5 or else nsight will not find them)
|
||||
if [ -d "$out"/cuda-samples ]; then
|
||||
mv "$out"/cuda-samples "$out"/samples
|
||||
fi
|
||||
|
||||
# Change the #error on GCC > 4.9 to a #warning.
|
||||
sed -i $out/include/host_config.h -e 's/#error\(.*unsupported GNU version\)/#warning\1/'
|
||||
|
||||
# Fix builds with newer glibc version
|
||||
sed -i "1 i#define _BITS_FLOATN_H" "$out/include/host_defines.h"
|
||||
|
||||
# Ensure that cmake can find CUDA.
|
||||
mkdir -p $out/nix-support
|
||||
echo "cmakeFlags+=' -DCUDA_TOOLKIT_ROOT_DIR=$out'" >> $out/nix-support/setup-hook
|
||||
|
||||
# Move some libraries to the lib output so that programs that
|
||||
# depend on them don't pull in this entire monstrosity.
|
||||
mkdir -p $lib/lib
|
||||
mv -v $out/lib64/libcudart* $lib/lib/
|
||||
|
||||
# Remove OpenCL libraries as they are provided by ocl-icd and driver.
|
||||
rm -f $out/lib64/libOpenCL*
|
||||
|
||||
# Set compiler for NVCC.
|
||||
wrapProgram $out/bin/nvcc \
|
||||
--prefix PATH : ${gcc}/bin
|
||||
|
||||
# nvprof do not find any program to profile if LD_LIBRARY_PATH is not set
|
||||
wrapProgram $out/bin/nvprof \
|
||||
--prefix LD_LIBRARY_PATH : $out/lib
|
||||
'' + lib.optionalString (lib.versionOlder version "8.0") ''
|
||||
# Hack to fix building against recent Glibc/GCC.
|
||||
echo "NIX_CFLAGS_COMPILE+=' -D_FORCE_INLINES'" >> $out/nix-support/setup-hook
|
||||
'' + ''
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
for b in nvvp nsight; do
|
||||
wrapProgram "$out/bin/$b" \
|
||||
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
|
||||
done
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
while IFS= read -r -d ''$'\0' i; do
|
||||
if ! isELF "$i"; then continue; fi
|
||||
echo "patching $i..."
|
||||
if [[ ! $i =~ \.so ]]; then
|
||||
patchelf \
|
||||
--set-interpreter "''$(cat $NIX_CC/nix-support/dynamic-linker)" $i
|
||||
fi
|
||||
if [[ $i =~ libcudart ]]; then
|
||||
rpath2=
|
||||
else
|
||||
rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64
|
||||
fi
|
||||
patchelf --set-rpath "$rpath2" --force-rpath $i
|
||||
done < <(find $out $lib $doc -type f -print0)
|
||||
'';
|
||||
|
||||
# Set RPATH so that libcuda and other libraries in
|
||||
# /run/opengl-driver(-32)/lib can be found. See the explanation in
|
||||
# addOpenGLRunpath. Don't try to figure out which libraries really need
|
||||
# it, just patch all (but not the stubs libraries). Note that
|
||||
# --force-rpath prevents changing RPATH (set above) to RUNPATH.
|
||||
postFixup = ''
|
||||
addOpenGLRunpath --force-rpath {$out,$lib}/lib/lib*.so
|
||||
'';
|
||||
|
||||
# cuda-gdb doesn't run correctly when not using sandboxing, so
|
||||
# temporarily disabling the install check. This should be set to true
|
||||
# when we figure out how to get `cuda-gdb --version` to run correctly
|
||||
# when not using sandboxing.
|
||||
doInstallCheck = false;
|
||||
postInstallCheck = let
|
||||
in ''
|
||||
# Smoke test binaries
|
||||
pushd $out/bin
|
||||
for f in *; do
|
||||
case $f in
|
||||
crt) continue;;
|
||||
nvcc.profile) continue;;
|
||||
nsight_ee_plugins_manage.sh) continue;;
|
||||
uninstall_cuda_toolkit_6.5.pl) continue;;
|
||||
computeprof|nvvp|nsight) continue;; # GUIs don't feature "--version"
|
||||
*) echo "Executing '$f --version':"; ./$f --version;;
|
||||
esac
|
||||
done
|
||||
popd
|
||||
'';
|
||||
passthru = {
|
||||
cc = gcc;
|
||||
majorVersion =
|
||||
let versionParts = lib.splitString "." version;
|
||||
in "${lib.elemAt versionParts 0}.${lib.elemAt versionParts 1}";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A compiler for NVIDIA GPUs, math libraries, and tools";
|
||||
homepage = "https://developer.nvidia.com/cuda-toolkit";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
license = licenses.unfree;
|
||||
};
|
||||
};
|
||||
|
||||
common = callPackage ./common.nix;
|
||||
in rec {
|
||||
cudatoolkit_6 = common {
|
||||
version = "6.0.37";
|
||||
@@ -304,5 +121,21 @@ in rec {
|
||||
gcc = gcc7;
|
||||
};
|
||||
|
||||
cudatoolkit_10 = cudatoolkit_10_0;
|
||||
cudatoolkit_10_1 = common {
|
||||
version = "10.1.243";
|
||||
url = "https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run";
|
||||
sha256 = "0caxhlv2bdq863dfp6wj7nad66ml81vasq2ayf11psvq2b12vhp7";
|
||||
|
||||
gcc = gcc7;
|
||||
};
|
||||
|
||||
cudatoolkit_10_2 = common {
|
||||
version = "10.2.89";
|
||||
url = "http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run";
|
||||
sha256 = "04fasl9sjkb1jvchvqgaqxprnprcz7a8r52249zp2ijarzyhf3an";
|
||||
|
||||
gcc = gcc7;
|
||||
};
|
||||
|
||||
cudatoolkit_10 = cudatoolkit_10_2;
|
||||
}
|
||||
|
||||
@@ -1,25 +1,28 @@
|
||||
{ stdenv, fetchgit, flex, bison, pkgconfig, python2, swig, which }:
|
||||
{ stdenv, lib, fetchgit, flex, bison, pkgconfig, which
|
||||
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform, python, swig
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dtc";
|
||||
version = "1.5.0";
|
||||
version = "1.5.1";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "075gj8bbahfdb8dlif3d2dpzjrkyf3bwbcmx96zpwhlgs0da8jxh";
|
||||
sha256 = "1jhhfrg22h53lvm2lqhd66pyk20pil08ry03wcwyx1c3ln27k73z";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ flex bison pkgconfig swig which ];
|
||||
buildInputs = [ python2 ];
|
||||
nativeBuildInputs = [ flex bison pkgconfig which ] ++ lib.optionals pythonSupport [ python swig ];
|
||||
buildInputs = lib.optionals pythonSupport [ python ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs pylibfdt/
|
||||
'';
|
||||
|
||||
makeFlags = [ "PYTHON=python" ];
|
||||
installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Device Tree Compiler";
|
||||
homepage = https://git.kernel.org/cgit/utils/dtc/dtc.git;
|
||||
license = licenses.gpl2; # dtc itself is GPLv2, libfdt is dual GPL/BSD
|
||||
|
||||
@@ -61,6 +61,7 @@ stdenv.mkDerivation {
|
||||
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/ecl/patches/16.1.2-getcwd.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
|
||||
sha256 = "1fbi8gn7rv8nqff5mpaijsrch3k3z7qc5cn4h1vl8qrr8xwqlqhb";
|
||||
})
|
||||
./ecl-1.16.2-libffi-3.3-abi.patch
|
||||
];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
@@ -78,6 +79,6 @@ stdenv.mkDerivation {
|
||||
description = "Lisp implementation aiming to be small, fast and easy to embed";
|
||||
license = stdenv.lib.licenses.mit ;
|
||||
maintainers = [stdenv.lib.maintainers.raskin];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -35,6 +35,10 @@ stdenv.mkDerivation {
|
||||
inherit (s) url sha256;
|
||||
};
|
||||
|
||||
patches = [
|
||||
./libffi-3.3-abi.patch
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
(if threadSupport then "--enable-threads" else "--disable-threads")
|
||||
"--with-gmp-prefix=${gmp.dev}"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
diff --git a/src/c/ffi.d b/src/c/ffi.d
|
||||
index 8861303e..8a959c23 100644
|
||||
--- a/src/c/ffi.d
|
||||
+++ b/src/c/ffi.d
|
||||
@@ -145,8 +145,8 @@ static struct {
|
||||
#elif defined(X86_WIN64)
|
||||
{@':win64', FFI_WIN64},
|
||||
#elif defined(X86_ANY) || defined(X86) || defined(X86_64)
|
||||
- {@':cdecl', FFI_SYSV},
|
||||
- {@':sysv', FFI_SYSV},
|
||||
+ {@':cdecl', FFI_UNIX64},
|
||||
+ {@':sysv', FFI_UNIX64},
|
||||
{@':unix64', FFI_UNIX64},
|
||||
#endif
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
diff --git a/src/c/ffi.d b/src/c/ffi.d
|
||||
index 8174977a..caa69f39 100644
|
||||
--- a/src/c/ffi.d
|
||||
+++ b/src/c/ffi.d
|
||||
@@ -133,8 +133,8 @@ static struct {
|
||||
#elif defined(X86_WIN64)
|
||||
{@':win64', FFI_WIN64},
|
||||
#elif defined(X86_ANY) || defined(X86) || defined(X86_64)
|
||||
- {@':cdecl', FFI_SYSV},
|
||||
- {@':sysv', FFI_SYSV},
|
||||
+ {@':cdecl', FFI_UNIX64},
|
||||
+ {@':sysv', FFI_UNIX64},
|
||||
{@':unix64', FFI_UNIX64},
|
||||
#endif
|
||||
};
|
||||
@@ -4,31 +4,17 @@
|
||||
let
|
||||
fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; };
|
||||
|
||||
patchBinwrap = import ./packages/patch-binwrap.nix { inherit lib writeScriptBin stdenv; };
|
||||
|
||||
elmNodePackages =
|
||||
import ./packages/node-composition.nix {
|
||||
inherit nodejs pkgs;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
};
|
||||
|
||||
hsPkgs = haskell.packages.ghc864.override {
|
||||
hsPkgs = haskell.packages.ghc881.override {
|
||||
overrides = self: super: with haskell.lib;
|
||||
let elmPkgs = rec {
|
||||
elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: {
|
||||
# sadly with parallelism most of the time breaks compilation
|
||||
# also compilation is slower with increasing number of cores anyway (Tested on Ryzen 7 and i7)
|
||||
enableParallelBuilding = false;
|
||||
preConfigure = self.fetchElmDeps {
|
||||
elmPackages = (import ./packages/elm-srcs.nix);
|
||||
versionsDat = ./versions.dat;
|
||||
elmVersion = drv.version;
|
||||
registryDat = ./registry.dat;
|
||||
};
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/elm/compiler/pull/1886/commits/39d86a735e28da514be185d4c3256142c37c2a8a.patch";
|
||||
sha256 = "0nni5qx1523rjz1ja42z6z9pijxvi3fgbw1dhq5qi11mh1nb9ay7";
|
||||
})
|
||||
];
|
||||
buildTools = drv.buildTools or [] ++ [ makeWrapper ];
|
||||
jailbreak = true;
|
||||
postInstall = ''
|
||||
@@ -41,24 +27,31 @@ let
|
||||
The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo:
|
||||
`package/nix/build.sh`
|
||||
*/
|
||||
elm-format = justStaticExecutables (doJailbreak (self.callPackage ./packages/elm-format.nix {}));
|
||||
|
||||
elmi-to-json = justStaticExecutables (self.callPackage ./packages/elmi-to-json.nix {});
|
||||
elm-format = justStaticExecutables (overrideCabal (self.callPackage ./packages/elm-format.nix {}) (drv: {
|
||||
# GHC 8.8.1 support
|
||||
# https://github.com/avh4/elm-format/pull/640
|
||||
patches = [(
|
||||
fetchpatch {
|
||||
url = "https://github.com/turboMaCk/elm-format/commit/4f4abdc7117ed6ce3335f6cf39b6495b48067b7c.patch";
|
||||
sha256 = "1zqk6q6w0ph12mnwffgwzf4h1hcgqg0v09ws9q2g5bg2riq4rvd9";
|
||||
}
|
||||
)];
|
||||
# Tests are failing after upgrade to ghc881.
|
||||
# Cause is probably just a minor change in stdout output
|
||||
# see https://github.com/avh4/elm-format/pull/640
|
||||
doCheck = false;
|
||||
jailbreak = true;
|
||||
}));
|
||||
elmi-to-json = justStaticExecutables (overrideCabal (self.callPackage ./packages/elmi-to-json.nix {}) (drv: {
|
||||
prePatch = ''
|
||||
substituteInPlace package.yaml --replace "- -Werror" ""
|
||||
hpack
|
||||
'';
|
||||
jailbreak = true;
|
||||
}));
|
||||
|
||||
inherit fetchElmDeps;
|
||||
elmVersion = elmPkgs.elm.version;
|
||||
|
||||
/*
|
||||
Node/NPM based dependecies can be upgraded using script
|
||||
`packages/generate-node-packages.sh`.
|
||||
Packages which rely on `bin-wrap` will fail by default
|
||||
and can be patched using `patchBinwrap` function defined in `packages/patch-binwrap.nix`.
|
||||
*/
|
||||
elm-test = patchBinwrap [elmi-to-json] elmNodePackages.elm-test;
|
||||
elm-verify-examples = patchBinwrap [elmi-to-json] elmNodePackages.elm-verify-examples;
|
||||
# elm-analyse@0.16.4 build is not working
|
||||
elm-analyse = elmNodePackages."elm-analyse-0.16.3";
|
||||
inherit (elmNodePackages) elm-doc-preview elm-live elm-upgrade elm-xref;
|
||||
};
|
||||
in elmPkgs // {
|
||||
inherit elmPkgs;
|
||||
@@ -67,4 +60,29 @@ let
|
||||
indents = self.callPackage ./packages/indents.nix {};
|
||||
};
|
||||
};
|
||||
in hsPkgs.elmPkgs
|
||||
|
||||
/*
|
||||
Node/NPM based dependecies can be upgraded using script
|
||||
`packages/generate-node-packages.sh`.
|
||||
Packages which rely on `bin-wrap` will fail by default
|
||||
and can be patched using `patchBinwrap` function defined in `packages/patch-binwrap.nix`.
|
||||
*/
|
||||
elmNodePackages =
|
||||
let
|
||||
nodePkgs = import ./packages/node-composition.nix {
|
||||
inherit nodejs pkgs;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
};
|
||||
in with hsPkgs.elmPkgs; {
|
||||
elm-test = patchBinwrap [elmi-to-json] nodePkgs.elm-test;
|
||||
elm-verify-examples = patchBinwrap [elmi-to-json] nodePkgs.elm-verify-examples;
|
||||
elm-language-server = nodePkgs."@elm-tooling/elm-language-server";
|
||||
|
||||
inherit (nodePkgs) elm-doc-preview elm-live elm-upgrade elm-xref elm-analyse;
|
||||
};
|
||||
|
||||
patchBinwrap = import ./packages/patch-binwrap.nix { inherit lib writeScriptBin stdenv; };
|
||||
|
||||
in hsPkgs.elmPkgs // elmNodePackages // {
|
||||
lib = { inherit patchBinwrap; };
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{stdenv, lib, fetchurl}:
|
||||
|
||||
{elmPackages, versionsDat}:
|
||||
{elmPackages, registryDat, elmVersion}:
|
||||
|
||||
let
|
||||
makeDotElm = import ./makeDotElm.nix {inherit stdenv lib fetchurl versionsDat;};
|
||||
makeDotElm = import ./makeDotElm.nix {inherit stdenv lib fetchurl registryDat;};
|
||||
|
||||
in
|
||||
''
|
||||
export ELM_HOME=`pwd`/.elm
|
||||
'' + (makeDotElm "0.19.0" elmPackages)
|
||||
'' + (makeDotElm elmVersion elmPackages)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{stdenv, lib, fetchurl, versionsDat}:
|
||||
{stdenv, lib, fetchurl, registryDat}:
|
||||
|
||||
ver: deps:
|
||||
let cmds = lib.mapAttrsToList (name: info: let
|
||||
@@ -20,11 +20,11 @@ ver: deps:
|
||||
|
||||
};
|
||||
in ''
|
||||
mkdir -p .elm/${ver}/package/${name}
|
||||
cp -R ${pkg} .elm/${ver}/package/${name}/${info.version}
|
||||
mkdir -p .elm/${ver}/packages/${name}
|
||||
cp -R ${pkg} .elm/${ver}/packages/${name}/${info.version}
|
||||
'') deps;
|
||||
in (lib.concatStrings cmds) + ''
|
||||
mkdir -p .elm/${ver}/package;
|
||||
cp ${versionsDat} .elm/${ver}/package/versions.dat;
|
||||
mkdir -p .elm/${ver}/packages;
|
||||
cp ${registryDat} .elm/${ver}/packages/registry.dat;
|
||||
chmod -R +w .elm
|
||||
''
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
};
|
||||
|
||||
"elm/json" = {
|
||||
sha256 = "1g0hafkqf2q633r7ir9wxpb1lnlzskhpsyi0h5bkzj0gl072zfnb";
|
||||
version = "1.0.0";
|
||||
sha256 = "1a107nmm905dih4w4mjjkkpdcjbgaf5qjvr7fl30kkpkckfjjnrw";
|
||||
version = "1.1.2";
|
||||
};
|
||||
|
||||
"elm/html" = {
|
||||
@@ -16,8 +16,8 @@
|
||||
};
|
||||
|
||||
"elm/svg" = {
|
||||
sha256 = "08x0v8p9wm699jjmsnbq69pxv3jh60j4f6fg7y6hyr7xxj85y390";
|
||||
version = "1.0.0";
|
||||
sha256 = "1cwcj73p61q45wqwgqvrvz3aypjyy3fw732xyxdyj6s256hwkn0k";
|
||||
version = "1.0.1";
|
||||
};
|
||||
|
||||
"elm/project-metadata-utils" = {
|
||||
@@ -26,23 +26,33 @@
|
||||
};
|
||||
|
||||
"elm/browser" = {
|
||||
sha256 = "1apmvyax93nvmagwj00y16zx10kfv640cxpi64xgqbgy7d2wphy4";
|
||||
version = "1.0.0";
|
||||
sha256 = "1zlmx672glg7fdgkvh5jm47y85pv7pdfr5mkhg6x7ar6k000vyka";
|
||||
version = "1.0.1";
|
||||
};
|
||||
|
||||
"elm/core" = {
|
||||
sha256 = "10kr86h4v5h4p0586q406a5wbl8xvr1jyrf6097zp2wb8sv21ylw";
|
||||
version = "1.0.0";
|
||||
sha256 = "1l0qdbczw91kzz8sx5d5zwz9x662bspy7p21dsr3f2rigxiix2as";
|
||||
version = "1.0.2";
|
||||
};
|
||||
|
||||
"elm/http" = {
|
||||
sha256 = "1igmm89ialzrjib1j8xagkxalq1x2gj4l0hfxcd66mpwmvg7psl8";
|
||||
version = "1.0.0";
|
||||
sha256 = "008bs76mnp48b4dw8qwjj4fyvzbxvlrl4xpa2qh1gg2kfwyw56v1";
|
||||
version = "2.0.0";
|
||||
};
|
||||
|
||||
"elm/bytes" = {
|
||||
sha256 = "040d7irrawcbnq9jxhzx8p9qacdlw5bncy6lgndd6inm53rvvwbp";
|
||||
version = "1.0.7";
|
||||
};
|
||||
|
||||
"elm/file" = {
|
||||
sha256 = "15vw1ilbg0msimq2k9magwigp8lwqrgvz3vk6qia6b3ldahvw8jr";
|
||||
version = "1.0.1";
|
||||
};
|
||||
|
||||
"elm/parser" = {
|
||||
sha256 = "0k4zlq30lrvawqvzwbvsl0hrmwf9s832mb41z7fdspm4549dj7wc";
|
||||
version = "1.0.0";
|
||||
sha256 = "0a3cxrvbm7mwg9ykynhp7vjid58zsw03r63qxipxp3z09qks7512";
|
||||
version = "1.1.0";
|
||||
};
|
||||
|
||||
"elm/url" = {
|
||||
@@ -56,7 +66,7 @@
|
||||
};
|
||||
|
||||
"elm/virtual-dom" = {
|
||||
sha256 = "0hm8g92h7z39km325dlnhk8n00nlyjkqp3r3jppr37k2k13md6aq";
|
||||
version = "1.0.0";
|
||||
sha256 = "0q1v5gi4g336bzz1lgwpn5b1639lrn63d8y6k6pimcyismp2i1yg";
|
||||
version = "1.0.2";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
{ mkDerivation, ansi-terminal, ansi-wl-pprint, base, binary
|
||||
, bytestring, containers, directory, edit-distance, fetchgit
|
||||
, file-embed, filepath, ghc-prim, haskeline, HTTP, http-client
|
||||
, http-client-tls, http-types, language-glsl, logict, mtl, network
|
||||
, parsec, process, raw-strings-qq, scientific, SHA, snap-core
|
||||
, snap-server, stdenv, template-haskell, text, time
|
||||
, file-embed, filelock, filepath, ghc-prim, haskeline, HTTP
|
||||
, http-client, http-client-tls, http-types, language-glsl, mtl
|
||||
, network, parsec, process, raw-strings-qq, scientific, SHA
|
||||
, snap-core, snap-server, stdenv, template-haskell, time
|
||||
, unordered-containers, utf8-string, vector, zip-archive
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elm";
|
||||
version = "0.19.0";
|
||||
version = "0.19.1";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/elm/compiler";
|
||||
sha256 = "13jks6c6i80z71mjjfg46ri570g5ini0k3xw3857v6z66zcl56x4";
|
||||
rev = "d5cbc41aac23da463236bbc250933d037da4055a";
|
||||
sha256 = "1rdg3xp3js9xadclk3cdypkscm5wahgsfmm4ldcw3xswzhw6ri8w";
|
||||
rev = "c9aefb6230f5e0bda03205ab0499f6e4af924495";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
executableHaskellDepends = [
|
||||
ansi-terminal ansi-wl-pprint base binary bytestring containers
|
||||
directory edit-distance file-embed filepath ghc-prim haskeline HTTP
|
||||
http-client http-client-tls http-types language-glsl logict mtl
|
||||
network parsec process raw-strings-qq scientific SHA snap-core
|
||||
snap-server template-haskell text time unordered-containers
|
||||
utf8-string vector zip-archive
|
||||
directory edit-distance file-embed filelock filepath ghc-prim
|
||||
haskeline HTTP http-client http-client-tls http-types language-glsl
|
||||
mtl network parsec process raw-strings-qq scientific SHA snap-core
|
||||
snap-server template-haskell time unordered-containers utf8-string
|
||||
vector zip-archive
|
||||
];
|
||||
homepage = "https://elm-lang.org";
|
||||
description = "The `elm` command line interface";
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
{ mkDerivation, aeson, async, base, binary, bytestring, containers
|
||||
, directory, filepath, hpack, optparse-applicative, safe-exceptions
|
||||
, stdenv, text, fetchgit
|
||||
{ mkDerivation, aeson, base, binary, bytestring, containers
|
||||
, directory, fetchgit, filepath, ghc-prim, hpack
|
||||
, optparse-applicative, stdenv, text, unliftio
|
||||
, unordered-containers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elmi-to-json";
|
||||
version = "0.19.4";
|
||||
version = "1.2.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/stoeffel/elmi-to-json.git";
|
||||
rev = "357ad96f05e4c68023b036f27f6f65c4377c7427";
|
||||
sha256 = "0vj9fdqgg2zd1nxpll6v02fk6bcyhx00xhp3s8sd7ycvirwsim9n";
|
||||
sha256 = "1kxai87h2g0749yq0fkxwk3xaavydraaivhnavbwr62q2hw4wrj7";
|
||||
rev = "af08ceafe742a252f1f1f3c229b0ce3b3e00084d";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson async base binary bytestring containers directory filepath
|
||||
optparse-applicative safe-exceptions text
|
||||
aeson base binary bytestring containers directory filepath ghc-prim
|
||||
optparse-applicative text unliftio unordered-containers
|
||||
];
|
||||
libraryToolDepends = [ hpack ];
|
||||
executableHaskellDepends = [ base ];
|
||||
testHaskellDepends = [ base ];
|
||||
preConfigure = "hpack";
|
||||
prePatch = "hpack";
|
||||
homepage = "https://github.com/stoeffel/elmi-to-json#readme";
|
||||
description = "Translates elmi binary files to JSON representation";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ turbomack ];
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs.nodejs-10_x}:
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-10_x"}:
|
||||
|
||||
let
|
||||
nodeEnv = import ../../../node-packages/node-env.nix {
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"elm-verify-examples",
|
||||
"elm-doc-preview",
|
||||
"elm-upgrade",
|
||||
{ "elm-analyse": "0.16.3" },
|
||||
"elm-analyse",
|
||||
"elm-live",
|
||||
"elm-xref"
|
||||
"elm-xref",
|
||||
"@elm-tooling/elm-language-server"
|
||||
]
|
||||
|
||||
+1151
-1140
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,8 +1,9 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -p cabal2nix elm2nix -i bash ../../..
|
||||
|
||||
cabal2nix https://github.com/elm/compiler --revision d5cbc41aac23da463236bbc250933d037da4055a > packages/elm.nix
|
||||
elm2nix snapshot > versions.dat
|
||||
pushd "$(nix-build -A elmPackages.elm.src --no-out-link ../../../..)/ui/browser"
|
||||
cabal2nix https://github.com/elm/compiler --revision c9aefb6230f5e0bda03205ab0499f6e4af924495 > packages/elm.nix
|
||||
echo "need to manually copy registry.dat from an existing elm project"
|
||||
#elm2nix snapshot > registry.dat
|
||||
pushd "$(nix-build -A elmPackages.elm.src --no-out-link ../../../..)/reactor"
|
||||
elm2nix convert > $OLDPWD/packages/elm-srcs.nix
|
||||
popd
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
|
||||
rev = "7999e72aecc3c5bc4019d43dc4697f49678cc3b4";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://downloads.factorcode.org/releases/0.98/factor-src-0.98.zip;
|
||||
url = https://downloads.factorcode.org/releases/0.98/factor-src-0.98.zip;
|
||||
sha256 = "01ip9mbnar4sv60d2wcwfz62qaamdvbykxw3gbhzqa25z36vi3ri";
|
||||
};
|
||||
|
||||
@@ -94,7 +94,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://factorcode.org;
|
||||
homepage = https://factorcode.org;
|
||||
license = licenses.bsd2;
|
||||
description = "A concatenative, stack-based programming language";
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "fasm-bin";
|
||||
|
||||
version = "1.73.16";
|
||||
version = "1.73.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://flatassembler.net/fasm-${version}.tgz";
|
||||
sha256 = "1jaqm7w458ny37fsw3fln17kw31rcsk8kyadci45qcbw6jspmn7k";
|
||||
sha256 = "0m88vi8ac9mlak430nyrg3nxsj0fzy3yli8kk0mqsw8rqw2pfvqb";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
{ stdenv, fetchurl, ncurses5, python27 }:
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, ncurses5
|
||||
, python27
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gcc-arm-embedded";
|
||||
version = "6-2017-q2-update";
|
||||
subdir = "6-2017q2";
|
||||
|
||||
src =
|
||||
if stdenv.isLinux then
|
||||
fetchurl {
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-linux.tar.bz2";
|
||||
sha256="1hvwi02mx34al525sngnl0cm7dkmzxfkb1brq9kvbv28wcplp3p6";
|
||||
}
|
||||
else if stdenv.isDarwin then
|
||||
fetchurl {
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-mac.tar.bz2";
|
||||
sha256="0019ylpq4inq7p5gydpmc9m8ni72fz2csrjlqmgx1698998q0c3x";
|
||||
}
|
||||
else throw "unsupported platform";
|
||||
suffix = {
|
||||
x86_64-darwin = "mac";
|
||||
x86_64-linux = "linux";
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
|
||||
sha256 = {
|
||||
x86_64-darwin = "0019ylpq4inq7p5gydpmc9m8ni72fz2csrjlqmgx1698998q0c3x";
|
||||
x86_64-linux = "1hvwi02mx34al525sngnl0cm7dkmzxfkb1brq9kvbv28wcplp3p6";
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
@@ -37,11 +41,11 @@ stdenv.mkDerivation rec {
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4/M7, Cortex-R4/R5/R7/R8)";
|
||||
homepage = https://developer.arm.com/open-source/gnu-toolchain/gnu-rm;
|
||||
license = with stdenv.lib.licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||
maintainers = with stdenv.lib.maintainers; [ vinymeuh ];
|
||||
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
||||
meta = with stdenv.lib; {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||
maintainers = with maintainers; [ prusnak ];
|
||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
{ stdenv, lib, fetchurl, ncurses5, python27 }:
|
||||
|
||||
with lib;
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, ncurses5
|
||||
, python27
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gcc-arm-embedded";
|
||||
version = "7-2018-q2-update";
|
||||
subdir = "7-2018q2";
|
||||
|
||||
src =
|
||||
if stdenv.isLinux then
|
||||
fetchurl {
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-linux.tar.bz2";
|
||||
sha256="0sgysp3hfpgrkcbfiwkp0a7ymqs02khfbrjabm52b5z61sgi05xv";
|
||||
}
|
||||
else if stdenv.isDarwin then
|
||||
fetchurl {
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-mac.tar.bz2";
|
||||
sha256="0nc7m0mpa39qyhfyydxkkyqm7spfc27xf6ygi2vd2aym4r9azi61";
|
||||
}
|
||||
else throw "unsupported platform";
|
||||
suffix = {
|
||||
x86_64-darwin = "mac";
|
||||
x86_64-linux = "linux";
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
|
||||
sha256 = {
|
||||
x86_64-darwin = "0nc7m0mpa39qyhfyydxkkyqm7spfc27xf6ygi2vd2aym4r9azi61";
|
||||
x86_64-linux = "0sgysp3hfpgrkcbfiwkp0a7ymqs02khfbrjabm52b5z61sgi05xv";
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
@@ -39,11 +41,11 @@ stdenv.mkDerivation rec {
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4/M7, Cortex-R4/R5/R7/R8)";
|
||||
homepage = https://developer.arm.com/open-source/gnu-toolchain/gnu-rm;
|
||||
meta = with stdenv.lib; {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||
maintainers = with maintainers; [ prusnak ];
|
||||
platforms = platforms.linux;
|
||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
{ stdenv, lib, fetchurl, ncurses5, python27 }:
|
||||
|
||||
with lib;
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, ncurses5
|
||||
, python27
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gcc-arm-embedded";
|
||||
version = "8-2019-q3-update";
|
||||
subdir = "8-2019q3/RC1.1";
|
||||
|
||||
src =
|
||||
if stdenv.isLinux then
|
||||
fetchurl {
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-linux.tar.bz2";
|
||||
sha256="b50b02b0a16e5aad8620e9d7c31110ef285c1dde28980b1a9448b764d77d8f92";
|
||||
}
|
||||
else if stdenv.isDarwin then
|
||||
fetchurl {
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-mac.tar.bz2";
|
||||
sha256="fc235ce853bf3bceba46eff4b95764c5935ca07fc4998762ef5e5b7d05f37085";
|
||||
}
|
||||
else throw "unsupported platform";
|
||||
suffix = {
|
||||
x86_64-darwin = "mac";
|
||||
x86_64-linux = "linux";
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
|
||||
sha256 = {
|
||||
x86_64-darwin = "fc235ce853bf3bceba46eff4b95764c5935ca07fc4998762ef5e5b7d05f37085";
|
||||
x86_64-linux = "b50b02b0a16e5aad8620e9d7c31110ef285c1dde28980b1a9448b764d77d8f92";
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
@@ -39,11 +41,11 @@ stdenv.mkDerivation rec {
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4/M7, Cortex-R4/R5/R7/R8)";
|
||||
homepage = https://developer.arm.com/open-source/gnu-toolchain/gnu-rm;
|
||||
meta = with stdenv.lib; {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||
maintainers = with maintainers; [ prusnak ];
|
||||
platforms = platforms.linux;
|
||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, ncurses5
|
||||
, python27
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gcc-arm-embedded";
|
||||
version = "9-2019-q4-major";
|
||||
subdir = "9-2019q4/RC2.1";
|
||||
|
||||
suffix = {
|
||||
aarch64-linux = "aarch64-linux";
|
||||
x86_64-darwin = "mac";
|
||||
x86_64-linux = "x86_64-linux";
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
|
||||
sha256 = {
|
||||
aarch64-linux = "1f5b9309006737950b2218250e6bb392e2d68d4f1a764fe66be96e2a78888d83";
|
||||
x86_64-darwin = "1249f860d4155d9c3ba8f30c19e7a88c5047923cea17e0d08e633f12408f01f0";
|
||||
x86_64-linux = "bcd840f839d5bf49279638e9f67890b2ef3a7c9c7a9b25271e83ec4ff41d177a";
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r * $out
|
||||
ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
|
||||
'';
|
||||
|
||||
dontPatchELF = true;
|
||||
dontStrip = true;
|
||||
|
||||
preFixup = ''
|
||||
find $out -type f | while read f; do
|
||||
patchelf $f > /dev/null 2>&1 || continue
|
||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
||||
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||
maintainers = with maintainers; [ prusnak ];
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
{ stdenv, bzip2, patchelf, glibc, gcc, fetchurl, version, releaseType, sha256, ncurses
|
||||
, dirName ? null, subdirName ? null }:
|
||||
with stdenv.lib;
|
||||
let
|
||||
versionParts = splitString "-" version; # 4.7 2013q3 20130916
|
||||
majorVersion = elemAt versionParts 0; # 4.7
|
||||
yearQuarter = elemAt versionParts 1; # 2013q3
|
||||
underscoreVersion = replaceChars ["."] ["_"] version; # 4_7-2013q3-20130916
|
||||
yearQuarterParts = splitString "q" yearQuarter; # 2013 3
|
||||
year = elemAt yearQuarterParts 0; # 2013
|
||||
quarter = elemAt yearQuarterParts 1; # 3
|
||||
dirName_ = if dirName != null then dirName else majorVersion;
|
||||
subdirName_ = if subdirName != null then subdirName
|
||||
else "${majorVersion}-${year}-q${quarter}-${releaseType}"; # 4.7-2013-q3-update
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "gcc-arm-embedded";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://launchpad.net/gcc-arm-embedded/${dirName_}/${subdirName_}/+download/gcc-arm-none-eabi-${underscoreVersion}-linux.tar.bz2";
|
||||
sha256 = sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ bzip2 patchelf ];
|
||||
|
||||
dontPatchELF = true;
|
||||
|
||||
phases = "unpackPhase patchPhase installPhase";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -pv $out
|
||||
cp -r ./* $out
|
||||
ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
|
||||
|
||||
for f in $(find $out); do
|
||||
if [ -f "$f" ] && patchelf "$f" 2> /dev/null; then
|
||||
patchelf --set-interpreter ${getLib glibc}/lib/ld-linux.so.2 \
|
||||
--set-rpath ${stdenv.lib.makeLibraryPath [ "$out" gcc ncurses ]} \
|
||||
"$f" || true
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors (Cortex-M0/M0+/M3/M4, Cortex-R4/R5/R7)";
|
||||
homepage = https://launchpad.net/gcc-arm-embedded;
|
||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||
maintainers = [ maintainers.rasendubi ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, enableLTO ? true
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man); required for Java
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
@@ -110,7 +111,8 @@ in
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
|
||||
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
@@ -198,8 +200,9 @@ stdenv.mkDerivation ({
|
||||
gmp mpfr libmpc libelf isl
|
||||
cloog
|
||||
|
||||
enablePlugin
|
||||
enableLTO
|
||||
enableMultilib
|
||||
enablePlugin
|
||||
enableShared
|
||||
|
||||
langC
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, enableLTO ? true
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man); required for Java
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
@@ -115,7 +116,8 @@ in
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
|
||||
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
@@ -204,8 +206,9 @@ stdenv.mkDerivation ({
|
||||
gmp mpfr libmpc libelf isl
|
||||
cloog
|
||||
|
||||
enablePlugin
|
||||
enableLTO
|
||||
enableMultilib
|
||||
enablePlugin
|
||||
enableShared
|
||||
|
||||
langC
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, enableLTO ? true
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man); required for Java
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
@@ -106,7 +107,8 @@ in
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
|
||||
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
@@ -215,8 +217,9 @@ stdenv.mkDerivation ({
|
||||
|
||||
gmp mpfr libmpc libelf isl
|
||||
|
||||
enablePlugin
|
||||
enableLTO
|
||||
enableMultilib
|
||||
enablePlugin
|
||||
enableShared
|
||||
|
||||
langC
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
{ stdenv, targetPackages, fetchurl, fetchpatch, fetchFromGitHub, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? stdenv.targetPlatform.isDarwin
|
||||
, langObjCpp ? stdenv.targetPlatform.isDarwin
|
||||
@@ -7,7 +7,9 @@
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, enableLTO ? true
|
||||
, texinfo ? null
|
||||
, flex
|
||||
, perl ? null # optional, for texi2pod (then pod2man); required for Java
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
, libelf # optional, for link-time optimizations (LTO)
|
||||
@@ -102,11 +104,17 @@ in
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
|
||||
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
src = if stdenv.targetPlatform.isVc4 then fetchFromGitHub {
|
||||
owner = "itszor";
|
||||
repo = "gcc-vc4";
|
||||
rev = "e90ff43f9671c760cf0d1dd62f569a0fb9bf8918";
|
||||
sha256 = "0gxf66hwqk26h8f853sybphqa5ca0cva2kmrw5jsiv6139g0qnp8";
|
||||
} else fetchurl {
|
||||
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz";
|
||||
sha256 = "0i89fksfp6wr1xg9l8296aslcymv2idn60ip31wr9s4pwin7kwby";
|
||||
};
|
||||
@@ -171,7 +179,8 @@ stdenv.mkDerivation ({
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
++ (optional (perl != null) perl)
|
||||
++ (optional javaAwtGtk pkgconfig);
|
||||
++ (optional javaAwtGtk pkgconfig)
|
||||
++ (optional (stdenv.targetPlatform.isVc4) flex);
|
||||
|
||||
# For building runtime libs
|
||||
depsBuildTarget =
|
||||
@@ -216,8 +225,9 @@ stdenv.mkDerivation ({
|
||||
|
||||
gmp mpfr libmpc libelf isl
|
||||
|
||||
enablePlugin
|
||||
enableLTO
|
||||
enableMultilib
|
||||
enablePlugin
|
||||
enableShared
|
||||
|
||||
langC
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, enableLTO ? true
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
@@ -42,7 +43,7 @@ with stdenv.lib;
|
||||
with builtins;
|
||||
|
||||
let majorVersion = "7";
|
||||
version = "${majorVersion}.4.0";
|
||||
version = "${majorVersion}.5.0";
|
||||
|
||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||
|
||||
@@ -77,13 +78,14 @@ let majorVersion = "7";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
|
||||
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
|
||||
sha256 = "0lgy170b0pp60j9cczqkmaqyjjb584vfamj4c30swd7k0j6y5pgd";
|
||||
sha256 = "0qg6kqc5l72hpnj4vr6l0p69qav0rh4anlkk3y55540zy3klc6dq";
|
||||
};
|
||||
|
||||
inherit patches;
|
||||
@@ -193,8 +195,9 @@ stdenv.mkDerivation ({
|
||||
|
||||
gmp mpfr libmpc libelf isl
|
||||
|
||||
enablePlugin
|
||||
enableLTO
|
||||
enableMultilib
|
||||
enablePlugin
|
||||
enableShared
|
||||
|
||||
langC
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, enableLTO ? true
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
@@ -69,7 +70,8 @@ let majorVersion = "8";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
|
||||
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
@@ -129,7 +131,12 @@ stdenv.mkDerivation ({
|
||||
sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
|
||||
''
|
||||
)
|
||||
else "");
|
||||
else "")
|
||||
+ stdenv.lib.optionalString targetPlatform.isAvr ''
|
||||
makeFlagsArray+=(
|
||||
'LIMITS_H_TEST=false'
|
||||
)
|
||||
'';
|
||||
|
||||
inherit noSysDirs staticCompiler crossStageStatic
|
||||
libcCross crossMingw;
|
||||
@@ -179,8 +186,9 @@ stdenv.mkDerivation ({
|
||||
|
||||
gmp mpfr libmpc libelf isl
|
||||
|
||||
enablePlugin
|
||||
enableLTO
|
||||
enableMultilib
|
||||
enablePlugin
|
||||
enableShared
|
||||
|
||||
langC
|
||||
@@ -263,9 +271,6 @@ stdenv.mkDerivation ({
|
||||
stdenv.lib.platforms.freebsd ++
|
||||
stdenv.lib.platforms.illumos ++
|
||||
stdenv.lib.platforms.darwin;
|
||||
|
||||
# See #40038
|
||||
broken = stdenv.isDarwin;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, enableLTO ? true
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
@@ -68,7 +69,8 @@ let majorVersion = "9";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
|
||||
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
@@ -128,7 +130,12 @@ stdenv.mkDerivation ({
|
||||
sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
|
||||
''
|
||||
)
|
||||
else "");
|
||||
else "")
|
||||
+ stdenv.lib.optionalString targetPlatform.isAvr ''
|
||||
makeFlagsArray+=(
|
||||
'LIMITS_H_TEST=false'
|
||||
)
|
||||
'';
|
||||
|
||||
inherit noSysDirs staticCompiler crossStageStatic
|
||||
libcCross crossMingw;
|
||||
@@ -178,8 +185,9 @@ stdenv.mkDerivation ({
|
||||
|
||||
gmp mpfr libmpc libelf isl
|
||||
|
||||
enablePlugin
|
||||
enableLTO
|
||||
enableMultilib
|
||||
enablePlugin
|
||||
enableShared
|
||||
|
||||
langC
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
, gmp, mpfr, libmpc, libelf, isl
|
||||
, cloog ? null
|
||||
|
||||
, enablePlugin
|
||||
, enableLTO
|
||||
, enableMultilib
|
||||
, enablePlugin
|
||||
, enableShared
|
||||
|
||||
, langC
|
||||
@@ -103,7 +104,7 @@ let
|
||||
|
||||
# Basic configuration
|
||||
++ [
|
||||
"--enable-lto"
|
||||
(lib.enableFeature enableLTO "lto")
|
||||
"--disable-libstdcxx-pch"
|
||||
"--without-included-gettext"
|
||||
"--with-system-zlib"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, enableLTO ? true
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
@@ -65,7 +66,8 @@ let majorVersion = "7";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
|
||||
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
@@ -150,8 +152,9 @@ stdenv.mkDerivation ({
|
||||
|
||||
gmp mpfr libmpc libelf isl
|
||||
|
||||
enablePlugin
|
||||
enableLTO
|
||||
enableMultilib
|
||||
enablePlugin
|
||||
enableShared
|
||||
|
||||
langC
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ stdenv, makeStaticLibraries,
|
||||
coreutils, rsync, bash,
|
||||
openssl, zlib, sqlite, libxml2, libyaml, mysql, lmdb, leveldb, postgresql,
|
||||
openssl, zlib, sqlite, libxml2, libyaml, libmysqlclient, lmdb, leveldb, postgresql,
|
||||
version, git-version, gambit, src }:
|
||||
|
||||
# TODO: distinct packages for gerbil-release and gerbil-devel
|
||||
@@ -12,13 +12,13 @@ stdenv.mkDerivation rec {
|
||||
inherit src;
|
||||
|
||||
# Use makeStaticLibraries to enable creation of statically linked binaries
|
||||
buildInputs_libraries = [ openssl zlib sqlite libxml2 libyaml mysql.connector-c lmdb leveldb postgresql ];
|
||||
buildInputs_libraries = [ openssl zlib sqlite libxml2 libyaml libmysqlclient lmdb leveldb postgresql ];
|
||||
buildInputs_staticLibraries = map makeStaticLibraries buildInputs_libraries;
|
||||
|
||||
buildInputs = [ gambit rsync bash ]
|
||||
++ buildInputs_libraries ++ buildInputs_staticLibraries;
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-I${mysql.connector-c}/include/mysql" "-L${mysql.connector-c}/lib/mysql" ];
|
||||
NIX_CFLAGS_COMPILE = [ "-I${libmysqlclient}/include/mysql" "-L${libmysqlclient}/lib/mysql" ];
|
||||
|
||||
postPatch = ''
|
||||
echo '(define (gerbil-version-string) "v${git-version}")' > src/gerbil/runtime/gx-version.scm
|
||||
@@ -40,7 +40,7 @@ ZLIB=${makeStaticLibraries zlib}/lib/libz.a
|
||||
# SQLITE=${makeStaticLibraries sqlite}/lib/sqlite.a # MISSING!
|
||||
# LIBXML2=${makeStaticLibraries libxml2}/lib/libxml2.a # MISSING!
|
||||
# YAML=${makeStaticLibraries libyaml}/lib/libyaml.a # MISSING!
|
||||
MYSQL=${makeStaticLibraries mysql.connector-c}/lib/mariadb/libmariadb.a
|
||||
MYSQL=${makeStaticLibraries libmysqlclient}/lib/mariadb/libmariadb.a
|
||||
# LMDB=${makeStaticLibraries lmdb}/lib/mysql/libmysqlclient_r.a # MISSING!
|
||||
LEVELDB=${makeStaticLibraries lmdb}/lib/libleveldb.a
|
||||
EOF
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
{ stdenv, callPackage, fetchFromGitHub, gambit-unstable }:
|
||||
{ stdenv, callPackage, fetchFromGitHub, gambit, gambit-unstable }:
|
||||
|
||||
callPackage ./build.nix {
|
||||
version = "unstable-2019-08-11";
|
||||
git-version = "0.16-DEV-132-gcb58f9a3";
|
||||
gambit = gambit-unstable;
|
||||
version = "unstable-2019-11-15";
|
||||
git-version = "0.15.1-461-gee22de62";
|
||||
#gambit = gambit-unstable;
|
||||
gambit = gambit;
|
||||
src = fetchFromGitHub {
|
||||
owner = "vyzo";
|
||||
repo = "gerbil";
|
||||
rev = "cb58f9a30630a6f3e85a55f2c1dcc654f517ffed";
|
||||
sha256 = "18jh64v1gi6z3pks9zf19f2wcjpv21cs270dnaq617kgwp53vysh";
|
||||
rev = "ee22de628a656ee59c6c72bc25d7b2e25a4ece2f";
|
||||
sha256 = "1n1j596b91k9xcmv22l72nga6wv20bka2q51ik2jw2vkcw8zkc1c";
|
||||
};
|
||||
inherit stdenv;
|
||||
}
|
||||
|
||||
+6
-25
@@ -2,7 +2,7 @@
|
||||
|
||||
# build-tools
|
||||
, bootPkgs
|
||||
, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4, sphinx
|
||||
, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx
|
||||
, bash
|
||||
|
||||
, libiconv ? null, ncurses
|
||||
@@ -86,33 +86,18 @@ let
|
||||
|
||||
in
|
||||
stdenv.mkDerivation (rec {
|
||||
version = "8.6.4";
|
||||
version = "8.10.0.20191210";
|
||||
name = "${targetPrefix}ghc-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
|
||||
sha256 = "0fihs1sr0hpk67dn9cmrsav13kkcp9hz8ggdqcrs80rj8vj0fpav";
|
||||
url = "https://downloads.haskell.org/ghc/8.10.1-alpha2/ghc-${version}-src.tar.xz";
|
||||
sha256 = "1mmv8s9cs41kp7wh1qqnzin5wv32cvs3lmzgda7njz0ssqb0mmvj";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
patches = [
|
||||
(fetchpatch rec { # https://phabricator.haskell.org/D5123
|
||||
url = "http://tarballs.nixos.org/sha256/${sha256}";
|
||||
name = "D5123.diff";
|
||||
sha256 = "0nhqwdamf2y4gbwqxcgjxs0kqx23w9gv5kj0zv6450dq19rji82n";
|
||||
})
|
||||
(fetchpatch { # https://github.com/haskell/haddock/issues/900
|
||||
url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/983.diff";
|
||||
name = "loadpluginsinmodules.diff";
|
||||
sha256 = "0bvvv0zsfq2581zsir97zfkggc1kkircbbajc2fz3b169ycpbha1";
|
||||
extraPrefix = "utils/haddock/";
|
||||
stripLen = 1;
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = "patchShebangs .";
|
||||
|
||||
# GHC is a bit confused on its cross terminology.
|
||||
@@ -125,7 +110,7 @@ stdenv.mkDerivation (rec {
|
||||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isLinux ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString (targetPlatform.isLinux && !(targetPlatform.useLLVM or false)) ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
@@ -207,10 +192,6 @@ stdenv.mkDerivation (rec {
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
|
||||
# See #63511 - the only unstripped file is the debug rts which isn't meant to
|
||||
# be stripped.
|
||||
dontStrip = true;
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
@@ -234,7 +215,7 @@ stdenv.mkDerivation (rec {
|
||||
inherit enableShared;
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc-8.6.4";
|
||||
haskellCompilerName = "ghc-${version}";
|
||||
};
|
||||
|
||||
meta = {
|
||||
@@ -126,7 +126,7 @@ stdenv.mkDerivation (rec {
|
||||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isLinux ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString (targetPlatform.isLinux && !(targetPlatform.useLLVM or false)) ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
||||
@@ -125,7 +125,7 @@ stdenv.mkDerivation (rec {
|
||||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isLinux ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString (targetPlatform.isLinux && !(targetPlatform.useLLVM or false)) ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
||||
@@ -110,7 +110,7 @@ stdenv.mkDerivation (rec {
|
||||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isLinux ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString (targetPlatform.isLinux && !(targetPlatform.useLLVM or false)) ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
||||
+48
-92
@@ -2,13 +2,15 @@
|
||||
|
||||
# build-tools
|
||||
, bootPkgs
|
||||
, autoconf, autoreconfHook, automake, coreutils, fetchurl, fetchpatch, perl, python3, sphinx
|
||||
, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx
|
||||
, bash
|
||||
, runCommand
|
||||
|
||||
, libiconv ? null, ncurses
|
||||
|
||||
, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
|
||||
, # GHC can be built with system libffi or a bundled one.
|
||||
libffi ? null
|
||||
|
||||
, useLLVM ? !stdenv.targetPlatform.isx86
|
||||
, # LLVM is conceptually a run-time-only depedendency, but for
|
||||
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
|
||||
# build-time dependency too.
|
||||
@@ -23,15 +25,19 @@
|
||||
|
||||
, # Whether to build dynamic libs for the standard library (on the target
|
||||
# platform). Static libs are always built.
|
||||
enableShared ? !stdenv.targetPlatform.useiOSPrebuilt
|
||||
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
|
||||
|
||||
, # Whetherto build terminfo.
|
||||
enableTerminfo ? !stdenv.targetPlatform.isWindows
|
||||
|
||||
, # What flavour to build. An empty string indicates no
|
||||
# specific flavour and falls back to ghc default values.
|
||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
|
||||
, # Whether to backport https://phabricator.haskell.org/D4388 for
|
||||
# deterministic profiling symbol names, at the cost of a slightly
|
||||
# non-standard GHC API
|
||||
deterministicProfiling ? false
|
||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
(if useLLVM then "perf-cross" else "perf-cross-ncg")
|
||||
|
||||
, # Whether to disable the large address space allocator
|
||||
# necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
|
||||
disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
|
||||
}:
|
||||
|
||||
assert !enableIntegerSimple -> gmp != null;
|
||||
@@ -67,9 +73,10 @@ let
|
||||
'';
|
||||
|
||||
# Splicer will pull out correct variations
|
||||
libDeps = platform: [ ncurses ]
|
||||
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
|
||||
++ [libffi]
|
||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||
++ stdenv.lib.optional (platform.libc != "glibc") libiconv;
|
||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
|
||||
toolsForTarget = [
|
||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||
@@ -79,81 +86,18 @@ let
|
||||
|
||||
in
|
||||
stdenv.mkDerivation (rec {
|
||||
version = "8.2.2";
|
||||
version = "8.8.1.20191211";
|
||||
name = "${targetPrefix}ghc-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
|
||||
sha256 = "1z05vkpaj54xdypmaml50hgsdpw29dhbs2r7magx0cm199iw73mv";
|
||||
url = "https://downloads.haskell.org/ghc/8.8.2-rc1/ghc-${version}-src.tar.xz";
|
||||
sha256 = "1gl4fzakjbhd94v1saxmr9sfzgk22m1b95jq51rxm93b2g4cixl4";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
patches = [
|
||||
(fetchpatch { # Fix STRIP to be substituted from configure
|
||||
url = "https://git.haskell.org/ghc.git/commitdiff_plain/2fc8ce5f0c8c81771c26266ac0b150ca9b75c5f3";
|
||||
sha256 = "03253ci40np1v6k0wmi4aypj3nmj3rdyvb1k6rwqipb30nfc719f";
|
||||
})
|
||||
(import ./abi-depends-determinism.nix { inherit fetchpatch runCommand; })
|
||||
] ++ stdenv.lib.optionals (hostPlatform != targetPlatform) [
|
||||
# Cherry-pick a few commits from newer hsc2hs so that proper binary is
|
||||
# installed -- stage 2 normally but stage 1 with cross.
|
||||
#
|
||||
# TODO make unconditional next mass rebuild.
|
||||
(fetchpatch {
|
||||
url = "https://git.haskell.org/hsc2hs.git/patch/ecdac062b5cf1d284906487849c56f4e149b3c8e";
|
||||
sha256 = "1gagswi26j50z44sdx0mk1sb3wr0nrqyaph9j724zp6iwqslxyzm";
|
||||
extraPrefix = "utils/hsc2hs/";
|
||||
stripLen = 1;
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://git.haskell.org/hsc2hs.git/patch/598303cbffcd230635fbce28ce4105d177fdf76a";
|
||||
sha256 = "0hqcg434qbh1bz1pk85cap2q4v9i8bs6x65yzq4spz6xk3zq6af7";
|
||||
extraPrefix = "utils/hsc2hs/";
|
||||
stripLen = 1;
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://git.haskell.org/hsc2hs.git/patch/9483ad10064fbbb97ab525280623826b1ef63959";
|
||||
sha256 = "1cpfdhfc0cz9xkjzkcgwx4fbyj96dkmd04wpwi1vji7fahw8kmf3";
|
||||
extraPrefix = "utils/hsc2hs/";
|
||||
stripLen = 1;
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://git.haskell.org/hsc2hs.git/patch/738f3666c878ee9e79c3d5e819ef8b3460288edf";
|
||||
sha256 = "0plzsbfaq6vb1023lsarrjglwgr9chld4q3m99rcfzx0yx5mibp3";
|
||||
extraPrefix = "utils/hsc2hs/";
|
||||
stripLen = 1;
|
||||
})
|
||||
] ++ stdenv.lib.optionals (hostPlatform != targetPlatform && targetPlatform.system == hostPlatform.system) [
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/gentoo/gentoo/08a41d2dff99645af6ac5a7bb4774f5f193b6f20/dev-lang/ghc/files/ghc-8.2.1_rc1-unphased-cross.patch";
|
||||
sha256 = "1hxj80bjx0x3w0f35cj3k2wipppr1ald03jwfy5q0xlxygdha17w";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/gentoo/gentoo/08a41d2dff99645af6ac5a7bb4774f5f193b6f20/dev-lang/ghc/files/ghc-8.2.1_rc1-staged-cross.patch";
|
||||
sha256 = "12xsln3zyfpvml8bwdpbc003h6zl1qh2qcq1rhdrw02n45dz8lvc";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/gentoo/gentoo/08a41d2dff99645af6ac5a7bb4774f5f193b6f20/dev-lang/ghc/files/ghc-8.2.1_rc1-ghci-cross.patch";
|
||||
sha256 = "03dcqf5af3vjhrky3f2z26j4d9h8qd9nkv76xp0l97h4cqk7vfqb";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/gentoo/gentoo/08a41d2dff99645af6ac5a7bb4774f5f193b6f20/dev-lang/ghc/files/ghc-8.2.1_rc1-stage2-cross.patch";
|
||||
sha256 = "0pi2m85wjxaaablq6n4q5vyn9qxvry5d7nmja4b28i68yb4ly9g1";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/gentoo/gentoo/08a41d2dff99645af6ac5a7bb4774f5f193b6f20/dev-lang/ghc/files/ghc-8.2.1_rc1-hp2ps-cross.patch";
|
||||
sha256 = "1fszfavf1cvrf02x500mi7jykcpvpl2i7i4qzr2qz9sbmyq063f0";
|
||||
})
|
||||
] ++ stdenv.lib.optional deterministicProfiling
|
||||
(fetchpatch { # Backport of https://phabricator.haskell.org/D4388 for more determinism
|
||||
url = "https://github.com/shlevy/ghc/commit/fec1b8d3555c447c0d8da0e96b659be67c8bb4bc.patch";
|
||||
sha256 = "1lyysz6hfd1njcigpm8xppbnkadqfs0kvrp7s8vqgb38pjswj5hg";
|
||||
})
|
||||
++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch;
|
||||
|
||||
postPatch = "patchShebangs .";
|
||||
|
||||
# GHC is a bit confused on its cross terminology.
|
||||
@@ -166,7 +110,7 @@ stdenv.mkDerivation (rec {
|
||||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isLinux ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString (targetPlatform.isLinux && !(targetPlatform.useLLVM or false)) ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
@@ -180,6 +124,24 @@ stdenv.mkDerivation (rec {
|
||||
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
|
||||
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
|
||||
echo "patching llvm-targets for musl targets..."
|
||||
echo "Cloning these existing '*-linux-gnu*' targets:"
|
||||
grep linux-gnu llvm-targets | sed 's/^/ /'
|
||||
echo "(go go gadget sed)"
|
||||
sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
|
||||
echo "llvm-targets now contains these '*-linux-musl*' targets:"
|
||||
grep linux-musl llvm-targets | sed 's/^/ /'
|
||||
|
||||
echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
|
||||
# (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
|
||||
for x in configure aclocal.m4; do
|
||||
substituteInPlace $x \
|
||||
--replace '*-android*|*-gnueabi*)' \
|
||||
'*-android*|*-gnueabi*|*-musleabi*)'
|
||||
done
|
||||
'';
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
@@ -188,11 +150,11 @@ stdenv.mkDerivation (rec {
|
||||
# `--with` flags for libraries needed for RTS linker
|
||||
configureFlags = [
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform) [
|
||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||
] ++ stdenv.lib.optionals (libffi != null) ["--with-system-libffi" "--with-ffi-includes=${targetPackages.libffi.dev}/include" "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
|
||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
|
||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||
"--enable-bootstrap-with-devel-snapshot"
|
||||
@@ -200,19 +162,18 @@ stdenv.mkDerivation (rec {
|
||||
"CFLAGS=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||
] ++ stdenv.lib.optionals (targetPlatform.isDarwin && targetPlatform.isAarch64) [
|
||||
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
|
||||
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
|
||||
dontAddExtraLibs = true;
|
||||
|
||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||
strictDeps = true;
|
||||
|
||||
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
|
||||
dontAddExtraLibs = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf autoreconfHook automake perl python3 sphinx
|
||||
perl autoconf automake m4 python3 sphinx
|
||||
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
||||
];
|
||||
|
||||
@@ -231,12 +192,7 @@ stdenv.mkDerivation (rec {
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
|
||||
# See #63511 - the only unstripped file is the debug rts which isn't meant to
|
||||
# be stripped.
|
||||
dontStrip = true;
|
||||
|
||||
checkTarget = "test";
|
||||
doCheck = false; # fails with "testsuite/tests: No such file or directory. Stop."
|
||||
|
||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
|
||||
@@ -259,7 +215,7 @@ stdenv.mkDerivation (rec {
|
||||
inherit enableShared;
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc-8.2.2";
|
||||
haskellCompilerName = "ghc-${version}";
|
||||
};
|
||||
|
||||
meta = {
|
||||
@@ -1,12 +0,0 @@
|
||||
# https://phabricator.haskell.org/D4159 to fix non-determinism in
|
||||
# cached abi-depends fields in package databases, modified to only
|
||||
# contain hunks that exist in distribution tarballs.
|
||||
{ fetchpatch, runCommand }: let
|
||||
base = fetchpatch rec { # Non-determinism in cached abi-depends fields
|
||||
# Originally https://phabricator-files.haskell.org/file/data/4pqrbo5b62sifktfbrls/PHID-FILE-4g4zjiqlfxmmlaos7lz7/D4159.diff
|
||||
url = "http://tarballs.nixos.org/sha256/${sha256}";
|
||||
name = "D4159.diff";
|
||||
sha256 = "0b8a08sisf1swmarm6nh9rgw7cpzi2rwdzvrd6ny49c7wk0f7x4b";
|
||||
};
|
||||
in runCommand base.name {}
|
||||
"sed -n '/utils\\/ghc-pkg/,$p' ${base} >$out"
|
||||
@@ -2,11 +2,14 @@
|
||||
|
||||
# build-tools
|
||||
, bootPkgs
|
||||
, autoconf, automake, coreutils, fetchgit, fetchpatch, perl, python3, m4, sphinx
|
||||
, autoconf, autoreconfHook, automake, coreutils, fetchgit, fetchpatch, perl, python3, m4, sphinx
|
||||
, bash
|
||||
|
||||
, libiconv ? null, ncurses
|
||||
|
||||
, enableDwarf ? !stdenv.targetPlatform.isDarwin &&
|
||||
!stdenv.targetPlatform.isWindows, elfutils # for DWARF support
|
||||
|
||||
, useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS
|
||||
, # LLVM is conceptually a run-time-only depedendency, but for
|
||||
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
|
||||
@@ -27,7 +30,7 @@
|
||||
, # Whetherto build terminfo.
|
||||
enableTerminfo ? !stdenv.targetPlatform.isWindows
|
||||
|
||||
, version ? "8.9.20190601"
|
||||
, version ? "8.10.20191119"
|
||||
, # What flavour to build. An empty string indicates no
|
||||
# specific flavour and falls back to ghc default values.
|
||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
@@ -73,7 +76,8 @@ let
|
||||
# Splicer will pull out correct variations
|
||||
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
|
||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
|
||||
++ stdenv.lib.optional enableDwarf elfutils;
|
||||
|
||||
toolsForTarget = [
|
||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||
@@ -89,8 +93,8 @@ stdenv.mkDerivation (rec {
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://gitlab.haskell.org/ghc/ghc.git/";
|
||||
rev = "9bc10993bb300d3712b0f13ec6e28621d75d4204";
|
||||
sha256 = "1s7vbinywx8ffj09nxr0h32nggjiqpssrvgmj7820k32w2yi7i8v";
|
||||
rev = "0418c38d55c7a47967187dce2db5ea2ab1021b1e";
|
||||
sha256 = "1d8g30ii0w4xh6fh61bxbalsqqyanny99nn3p727fx7favnhgvxi";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@@ -98,13 +102,6 @@ stdenv.mkDerivation (rec {
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
patches = [
|
||||
(fetchpatch { # https://github.com/haskell/haddock/issues/900
|
||||
url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/983.diff";
|
||||
name = "loadpluginsinmodules.diff";
|
||||
sha256 = "0bvvv0zsfq2581zsir97zfkggc1kkircbbajc2fz3b169ycpbha1";
|
||||
extraPrefix = "utils/haddock/";
|
||||
stripLen = 1;
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = "patchShebangs .";
|
||||
@@ -120,7 +117,7 @@ stdenv.mkDerivation (rec {
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
# and more generally have a faster linker.
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isLinux ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString (targetPlatform.isLinux && !(targetPlatform.useLLVM or false)) ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
@@ -176,14 +173,18 @@ stdenv.mkDerivation (rec {
|
||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
||||
"--disable-large-address-space"
|
||||
] ++ stdenv.lib.optional enableDwarf [
|
||||
"--enable-dwarf-unwind"
|
||||
"--with-libdw-includes=${stdenv.lib.getDev elfutils}/include"
|
||||
"--with-libdw-libraries=${stdenv.lib.getLib elfutils}/lib"
|
||||
];
|
||||
|
||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
perl autoconf automake m4 python3 sphinx
|
||||
bootPkgs.ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
||||
perl autoconf autoreconfHook automake m4 python3 sphinx
|
||||
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
|
||||
];
|
||||
|
||||
# For building runtime libs
|
||||
@@ -224,14 +225,14 @@ stdenv.mkDerivation (rec {
|
||||
inherit enableShared;
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc-8.7";
|
||||
haskellCompilerName = "ghc-${version}";
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = http://haskell.org/ghc;
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
|
||||
inherit (bootPkgs.ghc.meta) license platforms;
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{ haskellLib }:
|
||||
|
||||
let inherit (haskellLib) dontCheck doJailbreak;
|
||||
in self: super: {
|
||||
haddock-library-ghcjs = doJailbreak (dontCheck super.haddock-library-ghcjs);
|
||||
haddock-api-ghcjs = doJailbreak super.haddock-api-ghcjs;
|
||||
|
||||
template-haskell-ghcjs = doJailbreak super.template-haskell-ghcjs;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"url": "https://github.com/ghcjs/ghcjs",
|
||||
"rev": "81bf5f31dabaa711aab234cb119eb9c998ccb129",
|
||||
"sha256": "1bgnc71kjqicqv2xq8p70nck600yi2p7g4k9r1jclv21ib7i5hmx",
|
||||
"fetchSubmodules": true
|
||||
}
|
||||
@@ -1,176 +0,0 @@
|
||||
{ callPackage, configuredSrc }:
|
||||
|
||||
{
|
||||
|
||||
ghcjs = callPackage
|
||||
({ mkDerivation, aeson, array, attoparsec, base, base16-bytestring
|
||||
, base64-bytestring, binary, bytestring, Cabal, containers
|
||||
, cryptohash, data-default, deepseq, directory, executable-path
|
||||
, filepath, ghc-api-ghcjs, ghc-boot, ghc-paths, ghci-ghcjs
|
||||
, ghcjs-th, haddock-api-ghcjs, hashable, haskell-src-exts
|
||||
, haskell-src-meta, http-types, HUnit, lens, lifted-base, mtl
|
||||
, network, optparse-applicative, parallel, parsec, process, random
|
||||
, regex-posix, safe, shelly, split, stdenv, stringsearch, syb
|
||||
, system-fileio, system-filepath, tar, template-haskell
|
||||
, template-haskell-ghcjs, terminfo, test-framework
|
||||
, test-framework-hunit, text, time, transformers
|
||||
, transformers-compat, unix, unix-compat, unordered-containers
|
||||
, vector, wai, wai-app-static, wai-extra, wai-websockets, warp
|
||||
, webdriver, websockets, wl-pprint-text, yaml
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ghcjs";
|
||||
version = "8.4.0.1";
|
||||
src = configuredSrc + /.;
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
enableSeparateDataOutput = true;
|
||||
setupHaskellDepends = [
|
||||
base Cabal containers directory filepath process template-haskell
|
||||
transformers
|
||||
];
|
||||
libraryHaskellDepends = [
|
||||
aeson array attoparsec base base16-bytestring base64-bytestring
|
||||
binary bytestring Cabal containers cryptohash data-default deepseq
|
||||
directory filepath ghc-api-ghcjs ghc-boot ghc-paths ghci-ghcjs
|
||||
ghcjs-th hashable haskell-src-exts haskell-src-meta lens mtl
|
||||
optparse-applicative parallel parsec process regex-posix safe split
|
||||
stringsearch syb template-haskell template-haskell-ghcjs text time
|
||||
transformers unordered-containers vector wl-pprint-text yaml
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
aeson base binary bytestring Cabal containers directory
|
||||
executable-path filepath ghc-api-ghcjs ghc-boot haddock-api-ghcjs
|
||||
lens mtl optparse-applicative process shelly system-fileio
|
||||
system-filepath tar terminfo text time transformers
|
||||
transformers-compat unix unix-compat unordered-containers vector
|
||||
yaml
|
||||
];
|
||||
testHaskellDepends = [
|
||||
aeson base bytestring data-default deepseq directory http-types
|
||||
HUnit lens lifted-base network optparse-applicative process random
|
||||
shelly system-fileio system-filepath test-framework
|
||||
test-framework-hunit text time transformers unordered-containers
|
||||
wai wai-app-static wai-extra wai-websockets warp webdriver
|
||||
websockets yaml
|
||||
];
|
||||
description = "Haskell to JavaScript compiler";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}) {};
|
||||
|
||||
ghc-api-ghcjs = callPackage
|
||||
({ mkDerivation, array, base, binary, bytestring, containers
|
||||
, deepseq, directory, filepath, ghc-boot, ghc-boot-th, ghci-ghcjs
|
||||
, hpc, process, stdenv, template-haskell-ghcjs, terminfo, time
|
||||
, transformers, unix
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ghc-api-ghcjs";
|
||||
version = "8.4.0";
|
||||
src = configuredSrc + /lib/ghc-api-ghcjs;
|
||||
libraryHaskellDepends = [
|
||||
array base binary bytestring containers deepseq directory filepath
|
||||
ghc-boot ghc-boot-th ghci-ghcjs hpc process template-haskell-ghcjs
|
||||
terminfo time transformers unix
|
||||
];
|
||||
homepage = "http://www.haskell.org/ghc/";
|
||||
description = "The GHC API (customized for GHCJS)";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
ghci-ghcjs = callPackage
|
||||
({ mkDerivation, array, base, binary, bytestring, containers
|
||||
, deepseq, filepath, ghc-boot, ghc-boot-th, stdenv
|
||||
, template-haskell-ghcjs, transformers, unix
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ghci-ghcjs";
|
||||
version = "8.4.0";
|
||||
src = configuredSrc + /lib/ghci-ghcjs;
|
||||
libraryHaskellDepends = [
|
||||
array base binary bytestring containers deepseq filepath ghc-boot
|
||||
ghc-boot-th template-haskell-ghcjs transformers unix
|
||||
];
|
||||
description = "The library supporting GHC's interactive interpreter (customized for GHCJS)";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
ghcjs-th = callPackage
|
||||
({ mkDerivation, base, binary, bytestring, containers, ghc-prim
|
||||
, ghci-ghcjs, stdenv, template-haskell-ghcjs
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ghcjs-th";
|
||||
version = "0.1.0.0";
|
||||
src = configuredSrc + /lib/ghcjs-th;
|
||||
libraryHaskellDepends = [
|
||||
base binary bytestring containers ghc-prim ghci-ghcjs
|
||||
template-haskell-ghcjs
|
||||
];
|
||||
homepage = "https://github.com/ghcjs";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}) {};
|
||||
|
||||
haddock-api-ghcjs = callPackage
|
||||
({ mkDerivation, array, base, bytestring, Cabal, containers, deepseq
|
||||
, directory, filepath, ghc-api-ghcjs, ghc-boot, ghc-paths
|
||||
, haddock-library-ghcjs, hspec, hspec-discover, QuickCheck, stdenv
|
||||
, transformers, xhtml
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "haddock-api-ghcjs";
|
||||
version = "2.20.0";
|
||||
src = configuredSrc + /lib/haddock-api-ghcjs;
|
||||
enableSeparateDataOutput = true;
|
||||
libraryHaskellDepends = [
|
||||
array base bytestring Cabal containers deepseq directory filepath
|
||||
ghc-api-ghcjs ghc-boot ghc-paths haddock-library-ghcjs transformers
|
||||
xhtml
|
||||
];
|
||||
testHaskellDepends = [
|
||||
array base bytestring Cabal containers deepseq directory filepath
|
||||
ghc-api-ghcjs ghc-boot ghc-paths haddock-library-ghcjs hspec
|
||||
QuickCheck transformers xhtml
|
||||
];
|
||||
testToolDepends = [ hspec-discover ];
|
||||
homepage = "http://www.haskell.org/haddock/";
|
||||
description = "A documentation-generation tool for Haskell libraries";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
haddock-library-ghcjs = callPackage
|
||||
({ mkDerivation, base, base-compat, bytestring, containers, deepseq
|
||||
, directory, filepath, haddock-library, hspec, hspec-discover
|
||||
, optparse-applicative, QuickCheck, stdenv, transformers, tree-diff
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "haddock-library-ghcjs";
|
||||
version = "1.6.0";
|
||||
src = configuredSrc + /lib/haddock-library-ghcjs;
|
||||
libraryHaskellDepends = [
|
||||
base bytestring containers deepseq transformers
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base base-compat bytestring containers deepseq directory filepath
|
||||
haddock-library hspec optparse-applicative QuickCheck transformers
|
||||
tree-diff
|
||||
];
|
||||
testToolDepends = [ hspec-discover ];
|
||||
doHaddock = false;
|
||||
homepage = "http://www.haskell.org/haddock/";
|
||||
description = "Library exposing some functionality of Haddock";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
template-haskell-ghcjs = callPackage
|
||||
({ mkDerivation, base, ghc-boot-th, pretty, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "template-haskell-ghcjs";
|
||||
version = "2.13.0.0";
|
||||
src = configuredSrc + /lib/template-haskell-ghcjs;
|
||||
libraryHaskellDepends = [ base ghc-boot-th pretty ];
|
||||
description = "Support library for Template Haskell (customized for GHCJS)";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
}
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
let inherit (haskellLib) doJailbreak dontHaddock;
|
||||
in self: super: {
|
||||
ghc-api-ghcjs = super.ghc-api-ghcjs.override
|
||||
{
|
||||
happy = self.happy_1_19_5;
|
||||
};
|
||||
haddock-library-ghcjs = doJailbreak super.haddock-library-ghcjs;
|
||||
haddock-api-ghcjs = doJailbreak (dontHaddock super.haddock-api-ghcjs);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"url": "https://github.com/ghcjs/ghcjs",
|
||||
"rev": "75c61af32d73def4409d1fe7b64659c1d28cd075",
|
||||
"sha256": "18pixn6xdz6qp941yhxfnmwi463jnpskmg473lv07vvgy4hpgjhj",
|
||||
"rev": "e87195eaa2bc7e320e18cf10386802bc90b7c874",
|
||||
"sha256": "02mwkf7aagxqi142gcmq048244apslrr72p568akcab9s0fn2gvy",
|
||||
"fetchSubmodules": true
|
||||
}
|
||||
|
||||
@@ -59,20 +59,21 @@
|
||||
}) {};
|
||||
|
||||
ghc-api-ghcjs = callPackage
|
||||
({ mkDerivation, array, base, binary, bytestring, containers
|
||||
({ mkDerivation, alex, array, base, binary, bytestring, containers
|
||||
, deepseq, directory, filepath, ghc-boot, ghc-boot-th, ghc-heap
|
||||
, ghci-ghcjs, hpc, process, stdenv, template-haskell-ghcjs
|
||||
, ghci-ghcjs, happy, hpc, process, stdenv, template-haskell-ghcjs
|
||||
, terminfo, time, transformers, unix
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ghc-api-ghcjs";
|
||||
version = "8.6.2";
|
||||
version = "8.6.5";
|
||||
src = configuredSrc + /lib/ghc-api-ghcjs;
|
||||
libraryHaskellDepends = [
|
||||
array base binary bytestring containers deepseq directory filepath
|
||||
ghc-boot ghc-boot-th ghc-heap ghci-ghcjs hpc process
|
||||
template-haskell-ghcjs terminfo time transformers unix
|
||||
];
|
||||
libraryToolDepends = [ alex happy ];
|
||||
homepage = "http://www.haskell.org/ghc/";
|
||||
description = "The GHC API (customized for GHCJS)";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
@@ -107,7 +108,7 @@
|
||||
base binary bytestring containers ghc-prim ghci-ghcjs
|
||||
template-haskell-ghcjs
|
||||
];
|
||||
homepage = "https://github.com/ghcjs";
|
||||
homepage = "http://github.com/ghcjs";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}) {};
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{ haskellLib, alex, happy }:
|
||||
{ haskellLib }:
|
||||
|
||||
let inherit (haskellLib) addBuildTools appendConfigureFlag dontHaddock doJailbreak;
|
||||
in self: super: {
|
||||
ghc-api-ghcjs = addBuildTools super.ghc-api-ghcjs [alex happy];
|
||||
ghcjs = dontHaddock (appendConfigureFlag (doJailbreak super.ghcjs) "-fno-wrapper-install");
|
||||
haddock-library-ghcjs = dontHaddock super.haddock-library-ghcjs;
|
||||
system-fileio = doJailbreak super.system-fileio;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ stdenv
|
||||
, pkgsHostHost
|
||||
, callPackage
|
||||
, fetchgit
|
||||
, ghcjsSrcJson ? null
|
||||
@@ -14,7 +15,6 @@
|
||||
, pkgconfig
|
||||
, gcc
|
||||
, lib
|
||||
, nodePackages
|
||||
, ghcjsDepOverrides ? (_:_:{})
|
||||
, haskell
|
||||
}:
|
||||
@@ -34,7 +34,6 @@ let
|
||||
|
||||
(callPackage ./common-overrides.nix {
|
||||
inherit haskellLib;
|
||||
inherit (bootPkgs) alex happy;
|
||||
})
|
||||
ghcjsDepOverrides
|
||||
]);
|
||||
@@ -47,7 +46,7 @@ let
|
||||
|
||||
enableShared = true;
|
||||
|
||||
socket-io = nodePackages."socket.io";
|
||||
socket-io = pkgsHostHost.nodePackages."socket.io";
|
||||
|
||||
# Relics of the old GHCJS build system
|
||||
stage1Packages = [];
|
||||
@@ -105,5 +104,4 @@ in stdenv.mkDerivation {
|
||||
|
||||
meta.platforms = passthru.bootPkgs.ghc.meta.platforms;
|
||||
meta.maintainers = [lib.maintainers.elvishjerricco];
|
||||
meta.hydraPlatforms = [];
|
||||
}
|
||||
|
||||
@@ -1,161 +0,0 @@
|
||||
{ mkDerivation
|
||||
, lib
|
||||
, broken ? false
|
||||
, test-framework
|
||||
, test-framework-hunit
|
||||
, data-default
|
||||
, ghc-paths
|
||||
, haskell-src-exts
|
||||
, haskell-src-meta
|
||||
, optparse-applicative
|
||||
, system-fileio
|
||||
, system-filepath
|
||||
, text-binary
|
||||
, unordered-containers
|
||||
, cabal-install
|
||||
, wl-pprint-text
|
||||
, base16-bytestring
|
||||
, executable-path
|
||||
, transformers-compat
|
||||
, haddock-api
|
||||
, regex-posix
|
||||
|
||||
, bootPkgs, gmp
|
||||
|
||||
, runCommand
|
||||
, nodejs, stdenv, filepath, HTTP, HUnit, mtl, network, QuickCheck, random, stm
|
||||
, time
|
||||
, zlib, aeson, attoparsec, bzlib, hashable
|
||||
, lens
|
||||
, parallel, safe, shelly, split, stringsearch, syb
|
||||
, tar, terminfo
|
||||
, vector, yaml
|
||||
, alex, happy, git, gnumake, autoconf, patch
|
||||
, automake, libtool
|
||||
, cryptohash
|
||||
, haddock, hspec, xhtml, pkgs
|
||||
, coreutils
|
||||
, libiconv
|
||||
|
||||
, version
|
||||
, ghcjsSrc
|
||||
, ghcjsBootSrc
|
||||
, ghcjsBoot ? import ./ghcjs-boot.nix {
|
||||
inherit runCommand;
|
||||
src = ghcjsBootSrc;
|
||||
}
|
||||
, shims
|
||||
|
||||
# This is the list of the Stage 1 packages that are built into a booted ghcjs installation
|
||||
# It can be generated with the command:
|
||||
# nix-shell -p haskell.packages.ghcjs.ghc --command "ghcjs-pkg list | sed -n 's/^ \(.*\)-\([0-9.]*\)$/\1_\2/ p' | sed 's/\./_/g' | sed 's/^\([^_]*\)\(.*\)$/ \"\1\"/'"
|
||||
, stage1Packages
|
||||
|
||||
, stage2 ? import ./stage2.nix
|
||||
|
||||
, patches
|
||||
|
||||
# used for resolving compiler plugins
|
||||
, ghcLibdir ? null
|
||||
}:
|
||||
let
|
||||
inherit (bootPkgs) ghc;
|
||||
|
||||
in mkDerivation ({
|
||||
pname = "ghcjs";
|
||||
inherit version;
|
||||
src = ghcjsSrc;
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
jailbreak = true;
|
||||
doHaddock = false;
|
||||
doCheck = false;
|
||||
buildDepends = [
|
||||
filepath HTTP mtl network random stm time zlib aeson attoparsec
|
||||
bzlib data-default ghc-paths hashable haskell-src-exts haskell-src-meta
|
||||
lens optparse-applicative parallel safe shelly split
|
||||
stringsearch syb system-fileio system-filepath tar terminfo text-binary
|
||||
unordered-containers vector wl-pprint-text yaml
|
||||
alex happy git gnumake autoconf automake libtool patch gmp
|
||||
base16-bytestring cryptohash executable-path haddock-api
|
||||
transformers-compat QuickCheck haddock hspec xhtml
|
||||
regex-posix libiconv
|
||||
];
|
||||
buildTools = [ nodejs git ];
|
||||
testDepends = [
|
||||
HUnit test-framework test-framework-hunit
|
||||
];
|
||||
inherit patches;
|
||||
postPatch = ''
|
||||
substituteInPlace Setup.hs \
|
||||
--replace "/usr/bin/env" "${coreutils}/bin/env"
|
||||
|
||||
substituteInPlace src/Compiler/Info.hs \
|
||||
--replace "@PREFIX@" "$out" \
|
||||
--replace "@VERSION@" "${version}"
|
||||
|
||||
substituteInPlace src-bin/Boot.hs \
|
||||
--replace "@PREFIX@" "$out" \
|
||||
--replace "@CC@" "${stdenv.cc}/bin/cc"
|
||||
'';
|
||||
preBuild = ''
|
||||
export HOME="$TMP"
|
||||
|
||||
local topDir=$out/lib/ghcjs-${version}
|
||||
mkdir -p $topDir
|
||||
|
||||
cp -r ${ghcjsBoot} $topDir/ghcjs-boot
|
||||
chmod -R u+w $topDir/ghcjs-boot
|
||||
|
||||
cp -r ${shims} $topDir/shims
|
||||
chmod -R u+w $topDir/shims
|
||||
|
||||
# Make the patches be relative their corresponding package's directory.
|
||||
# See: https://github.com/ghcjs/ghcjs-boot/pull/12
|
||||
for patch in "$topDir/ghcjs-boot/patches/"*.patch; do
|
||||
echo "fixing patch: $patch"
|
||||
sed -i -e 's@ \(a\|b\)/boot/[^/]\+@ \1@g' $patch
|
||||
done
|
||||
'';
|
||||
# We build with --quick so we can build stage 2 packages separately.
|
||||
# This is necessary due to: https://github.com/haskell/cabal/commit/af19fb2c2d231d8deff1cb24164a2bf7efb8905a
|
||||
# Cabal otherwise fails to build: http://hydra.nixos.org/build/31824079/nixlog/1/raw
|
||||
postInstall = ''
|
||||
PATH=$out/bin:$PATH LD_LIBRARY_PATH=${gmp.out}/lib:${stdenv.cc}/lib64:$LD_LIBRARY_PATH \
|
||||
env -u GHC_PACKAGE_PATH $out/bin/ghcjs-boot \
|
||||
--dev \
|
||||
--quick \
|
||||
--with-cabal ${cabal-install}/bin/cabal \
|
||||
--with-gmp-includes ${gmp.dev}/include \
|
||||
--with-gmp-libraries ${gmp.out}/lib
|
||||
'' + lib.optionalString (ghcLibdir != null) ''
|
||||
printf '%s' '${ghcLibdir}' > "$out/lib/ghcjs-${version}/ghc_libdir"
|
||||
'';
|
||||
passthru = {
|
||||
inherit bootPkgs;
|
||||
ghcVersion = ghc.version;
|
||||
isCross = true;
|
||||
isGhcjs = true;
|
||||
inherit nodejs ghcjsBoot;
|
||||
socket-io = pkgs.nodePackages."socket.io";
|
||||
haskellCompilerName = "ghcjs-${version}";
|
||||
|
||||
# let us assume ghcjs is never actually cross compiled
|
||||
targetPrefix = "";
|
||||
|
||||
enableShared = true;
|
||||
|
||||
inherit stage1Packages;
|
||||
mkStage2 = stage2 {
|
||||
inherit ghcjsBoot;
|
||||
};
|
||||
};
|
||||
|
||||
homepage = https://github.com/ghcjs/ghcjs;
|
||||
description = "A Haskell to JavaScript compiler that uses the GHC API";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
platforms = ghc.meta.platforms;
|
||||
maintainers = with stdenv.lib.maintainers; [ jwiegley cstrahan dmjio elvishjerricco ];
|
||||
hydraPlatforms = if broken then [] else ghc.meta.platforms;
|
||||
inherit broken;
|
||||
})
|
||||
@@ -1,54 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'pathname'
|
||||
|
||||
# from boot.yaml in ghcjs/ghcjs
|
||||
stage2_packages = [
|
||||
"boot/async",
|
||||
"boot/aeson",
|
||||
"boot/attoparsec",
|
||||
"boot/case-insensitive",
|
||||
"boot/dlist",
|
||||
"boot/extensible-exceptions",
|
||||
"boot/hashable",
|
||||
"boot/mtl",
|
||||
"boot/old-time",
|
||||
"boot/parallel",
|
||||
"boot/scientific",
|
||||
"boot/stm",
|
||||
"boot/syb",
|
||||
"boot/text",
|
||||
"boot/unordered-containers",
|
||||
"boot/vector",
|
||||
"ghcjs/ghcjs-base",
|
||||
# not listed under stage2, but needed when "quick booting".
|
||||
"boot/cabal/Cabal"
|
||||
]
|
||||
|
||||
nixpkgs = File.expand_path("../../../../..", __FILE__)
|
||||
boot = ARGV[0] || `nix-build #{nixpkgs} -A haskell.packages.ghcjs.ghc.ghcjsBoot`.chomp
|
||||
|
||||
out = "".dup
|
||||
out << "{ ghcjsBoot }: { callPackage }:\n"
|
||||
out << "\n"
|
||||
out << "{\n"
|
||||
|
||||
stage2_packages.each do |package|
|
||||
name = Pathname.new(package).basename
|
||||
nix = `cabal2nix file://#{boot}/#{package} --jailbreak`
|
||||
nix.sub!(/src =.*?$/, "src = \"${ghcjsBoot}/#{package}\";")
|
||||
nix.sub!(" doCheck = false;\n", "")
|
||||
nix.sub!("libraryHaskellDepends", "doCheck = false;\n libraryHaskellDepends")
|
||||
# cabal2nix somehow generates the deps for 'text' as if it had selected flag
|
||||
# 'integer-simple' (despite not passing the flag within the generated
|
||||
# expression). We want integer-gmp instead.
|
||||
nix.gsub!(/integer-simple/, "integer-gmp")
|
||||
nix = nix.split("\n").join("\n ")
|
||||
|
||||
out << " #{name} = callPackage\n"
|
||||
out << " (#{nix}) {};\n"
|
||||
end
|
||||
|
||||
out << "}"
|
||||
|
||||
puts out
|
||||
@@ -1,25 +0,0 @@
|
||||
{ runCommand, src }:
|
||||
|
||||
# we remove the patches so ghcjs-boot doesn't try to apply them again.
|
||||
runCommand "${src.name}-patched" {} ''
|
||||
cp -r ${src} $out
|
||||
chmod -R +w $out
|
||||
|
||||
# Make the patches be relative their corresponding package's directory.
|
||||
# See: https://github.com/ghcjs/ghcjs-boot/pull/12
|
||||
for patch in $out/patches/*.patch; do
|
||||
echo ">> fixing patch: $patch"
|
||||
sed -i -e 's@ \(a\|b\)/boot/[^/]\+@ \1@g' $patch
|
||||
done
|
||||
|
||||
for package in $(cd $out/boot; echo *); do
|
||||
patch=$out/patches/$package.patch
|
||||
if [[ -e $patch ]]; then
|
||||
echo ">> patching package: $package"
|
||||
pushd $out/boot/$package
|
||||
patch -p1 < $patch
|
||||
rm $patch
|
||||
popd
|
||||
fi
|
||||
done
|
||||
''
|
||||
@@ -0,0 +1,24 @@
|
||||
{ stdenv, rustPlatform, fetchFromGitHub, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "gleam";
|
||||
version = "0.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lpil";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "17h573fm5b1f71ivyipl76p0vw7injm7j3cbg6plkfizcb1j5m7f";
|
||||
};
|
||||
|
||||
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
cargoSha256 = "04v1gj5nmmcizyrsg6b87qsfzw2zqi57vf1zlnq8680yc54qdah9";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A statically typed language for the Erlang VM";
|
||||
homepage = "https://gleam.run/";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ filalex77 ];
|
||||
};
|
||||
}
|
||||
@@ -1,33 +1,24 @@
|
||||
{ lib, buildGoPackage, fetchFromGitHub }:
|
||||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoPackage rec {
|
||||
buildGoModule rec {
|
||||
pname = "go-jsonnet";
|
||||
version = "0.13.0";
|
||||
|
||||
goPackagePath = "github.com/google/go-jsonnet";
|
||||
|
||||
# regenerate deps.nix using following steps:
|
||||
#
|
||||
# go get -u github.com/google/go-jsonnet
|
||||
# cd $GOPATH/src/github.com/google/go-jsonnet
|
||||
# git checkout <version>
|
||||
# dep init
|
||||
# dep2nix
|
||||
goDeps = ./deps.nix;
|
||||
version = "0.14.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
rev = "v${version}";
|
||||
owner = "google";
|
||||
repo = "go-jsonnet";
|
||||
sha256 = "0x95sqhrw4pscxq0q8781wix0w881k9my5kn5nf6k0fg1d6qlgiy";
|
||||
fetchSubmodules = true;
|
||||
rev = "v${version}";
|
||||
sha256 = "1q0mpydh8h0zrml605q9r259y8584kbwcr9g4sqcb1n13b4d1sgp";
|
||||
};
|
||||
|
||||
meta = {
|
||||
modSha256 = "1b6hz5a66hhlzpcv1badxr1b4nmk4lw0507d5jks7lqzvvwd0sxq";
|
||||
|
||||
subPackages = [ "cmd/jsonnet" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An implementation of Jsonnet in pure Go";
|
||||
maintainers = with lib.maintainers; [ nshalman ];
|
||||
license = lib.licenses.asl20;
|
||||
homepage = https://github.com/google/go-jsonnet;
|
||||
platforms = lib.platforms.unix;
|
||||
homepage = "https://github.com/google/go-jsonnet";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ nshalman ];
|
||||
};
|
||||
}
|
||||
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix)
|
||||
[
|
||||
{
|
||||
goPackagePath = "github.com/fatih/color";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/fatih/color";
|
||||
rev = "5b77d2a35fb0ede96d138fc9a99f5c9b6aef11b4";
|
||||
sha256 = "0v8msvg38r8d1iiq2i5r4xyfx0invhc941kjrsg5gzwvagv55inv";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/mattn/go-colorable";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mattn/go-colorable";
|
||||
rev = "167de6bfdfba052fa6b2d3664c8f5272e23c9072";
|
||||
sha256 = "1nwjmsppsjicr7anq8na6md7b1z84l9ppnlr045hhxjvbkqwalvx";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/mattn/go-isatty";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mattn/go-isatty";
|
||||
rev = "1311e847b0cb909da63b5fecfb5370aa66236465";
|
||||
sha256 = "0rqfh1rj6f5wm8p2ky7inm8g10152p7w6n2cli17kf9gad797i8h";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/sergi/go-diff";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/sergi/go-diff";
|
||||
rev = "1744e2970ca51c86172c8190fadad617561ed6e7";
|
||||
sha256 = "0swiazj8wphs2zmk1qgq75xza6m19snif94h2m6fi8dqkwqdl7c7";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "golang.org/x/sys";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://go.googlesource.com/sys";
|
||||
rev = "4c4f7f33c9ed00de01c4c741d2177abfcfe19307";
|
||||
sha256 = "191001bxqyc3xfs46nnqmm7jdk0r73vk7a4zqngfl7zwjv9smwsq";
|
||||
};
|
||||
}
|
||||
]
|
||||
@@ -30,11 +30,11 @@ in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "go";
|
||||
version = "1.12.9";
|
||||
version = "1.12.10";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dl.google.com/go/go${version}.src.tar.gz";
|
||||
sha256 = "1z32imbwmpkzgyh5c3vi7rbvzbq94xjk5qi2xm9sccj7kknmc3mb";
|
||||
sha256 = "0m1rvawvpdl7kd0asw10m50xbxlhykix6dng9p4x6ih6x3y4hvpm";
|
||||
};
|
||||
|
||||
# perl is used for testing go vet
|
||||
@@ -96,6 +96,12 @@ stdenv.mkDerivation rec {
|
||||
# Disable cgo lookup tests not works, they depend on resolver
|
||||
rm src/net/cgo_unix_test.go
|
||||
|
||||
# Disable TestGcSys because it's flakey in our tests, but the failure is not
|
||||
# reproducible by multiple people in other environments.
|
||||
# See https://github.com/NixOS/nixpkgs/issues/68361#issuecomment-537849272 and following
|
||||
# NOTE: Try re-enabling for releases newer than 1.12.9
|
||||
sed -i '/TestGcSys/areturn' src/runtime/gc_test.go
|
||||
|
||||
'' + optionalString stdenv.isLinux ''
|
||||
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
|
||||
'' + optionalString stdenv.isAarch32 ''
|
||||
|
||||
@@ -17,24 +17,24 @@ let
|
||||
'';
|
||||
|
||||
goarch = platform: {
|
||||
i686 = "386";
|
||||
x86_64 = "amd64";
|
||||
aarch64 = "arm64";
|
||||
arm = "arm";
|
||||
armv5tel = "arm";
|
||||
armv6l = "arm";
|
||||
armv7l = "arm";
|
||||
"i686" = "386";
|
||||
"x86_64" = "amd64";
|
||||
"aarch64" = "arm64";
|
||||
"arm" = "arm";
|
||||
"armv5tel" = "arm";
|
||||
"armv6l" = "arm";
|
||||
"armv7l" = "arm";
|
||||
}.${platform.parsed.cpu.name} or (throw "Unsupported system");
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "go";
|
||||
version = "1.11.13";
|
||||
version = "1.13.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dl.google.com/go/go${version}.src.tar.gz";
|
||||
sha256 = "0xj0pbviikdf8g0sfz5hwxf7hwz8b8g5akqnrvyclhgnsdghjcjh";
|
||||
sha256 = "1zr6lravlmyld57nnymkcr092pys4pr8qy0ans1rj3dkl3i5dlr7";
|
||||
};
|
||||
|
||||
# perl is used for testing go vet
|
||||
@@ -57,8 +57,8 @@ stdenv.mkDerivation rec {
|
||||
--replace '#!/usr/bin/env bash' '#!${runtimeShell}'
|
||||
|
||||
# Patch the mimetype database location which is missing on NixOS.
|
||||
substituteInPlace src/mime/type_unix.go \
|
||||
--replace '/etc/mime.types' '${mailcap}/etc/mime.types'
|
||||
# but also allow static binaries built with NixOS to run outside nix
|
||||
sed -i 's,\"/etc/mime.types,"${mailcap}/etc/mime.types\"\,\n\t&,' src/mime/type_unix.go
|
||||
|
||||
# Disabling the 'os/http/net' tests (they want files not available in
|
||||
# chroot builds)
|
||||
@@ -70,25 +70,25 @@ stdenv.mkDerivation rec {
|
||||
sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go
|
||||
sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go
|
||||
# Disable the unix socket test
|
||||
sed -i '/TestShutdownUnix/areturn' src/net/net_test.go
|
||||
sed -i '/TestShutdownUnix/aif true \{ return\; \}' src/net/net_test.go
|
||||
# Disable the hostname test
|
||||
sed -i '/TestHostname/areturn' src/os/os_test.go
|
||||
sed -i '/TestHostname/aif true \{ return\; \}' src/os/os_test.go
|
||||
# ParseInLocation fails the test
|
||||
sed -i '/TestParseInSydney/areturn' src/time/format_test.go
|
||||
sed -i '/TestParseInSydney/aif true \{ return\; \}' src/time/format_test.go
|
||||
# Remove the api check as it never worked
|
||||
sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go
|
||||
# Remove the coverage test as we have removed this utility
|
||||
sed -i '/TestCoverageWithCgo/areturn' src/cmd/go/go_test.go
|
||||
sed -i '/TestCoverageWithCgo/aif true \{ return\; \}' src/cmd/go/go_test.go
|
||||
# Remove the timezone naming test
|
||||
sed -i '/TestLoadFixed/areturn' src/time/time_test.go
|
||||
sed -i '/TestLoadFixed/aif true \{ return\; \}' src/time/time_test.go
|
||||
# Remove disable setgid test
|
||||
sed -i '/TestRespectSetgidDir/areturn' src/cmd/go/internal/work/build_test.go
|
||||
sed -i '/TestRespectSetgidDir/aif true \{ return\; \}' src/cmd/go/internal/work/build_test.go
|
||||
# Remove cert tests that conflict with NixOS's cert resolution
|
||||
sed -i '/TestEnvVars/areturn' src/crypto/x509/root_unix_test.go
|
||||
sed -i '/TestEnvVars/aif true \{ return\; \}' src/crypto/x509/root_unix_test.go
|
||||
# TestWritevError hangs sometimes
|
||||
sed -i '/TestWritevError/areturn' src/net/writev_test.go
|
||||
sed -i '/TestWritevError/aif true \{ return\; \}' src/net/writev_test.go
|
||||
# TestVariousDeadlines fails sometimes
|
||||
sed -i '/TestVariousDeadlines/areturn' src/net/timeout_test.go
|
||||
sed -i '/TestVariousDeadlines/aif true \{ return\; \}' src/net/timeout_test.go
|
||||
|
||||
sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
|
||||
sed -i 's,/etc/services,${iana-etc}/etc/services,' src/net/port_unix.go
|
||||
@@ -97,7 +97,10 @@ stdenv.mkDerivation rec {
|
||||
rm src/net/cgo_unix_test.go
|
||||
|
||||
'' + optionalString stdenv.isLinux ''
|
||||
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
|
||||
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries
|
||||
# that run outside a nix server
|
||||
sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go
|
||||
|
||||
'' + optionalString stdenv.isAarch32 ''
|
||||
echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash
|
||||
'' + optionalString stdenv.isDarwin ''
|
||||
@@ -107,35 +110,42 @@ stdenv.mkDerivation rec {
|
||||
sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
|
||||
sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
|
||||
|
||||
sed -i '/TestChdirAndGetwd/areturn' src/os/os_test.go
|
||||
sed -i '/TestCredentialNoSetGroups/areturn' src/os/exec/exec_posix_test.go
|
||||
sed -i '/TestRead0/areturn' src/os/os_test.go
|
||||
sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
|
||||
sed -i '/TestChdirAndGetwd/aif true \{ return\; \}' src/os/os_test.go
|
||||
sed -i '/TestCredentialNoSetGroups/aif true \{ return\; \}' src/os/exec/exec_posix_test.go
|
||||
sed -i '/TestRead0/aif true \{ return\; \}' src/os/os_test.go
|
||||
sed -i '/TestSystemRoots/aif true \{ return\; \}' src/crypto/x509/root_darwin_test.go
|
||||
|
||||
sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/areturn' src/cmd/go/go_test.go
|
||||
sed -i '/TestBuildDashIInstallsDependencies/areturn' src/cmd/go/go_test.go
|
||||
sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/aif true \{ return\; \}' src/cmd/go/go_test.go
|
||||
sed -i '/TestBuildDashIInstallsDependencies/aif true \{ return\; \}' src/cmd/go/go_test.go
|
||||
|
||||
sed -i '/TestDisasmExtld/areturn' src/cmd/objdump/objdump_test.go
|
||||
sed -i '/TestDisasmExtld/aif true \{ return\; \}' src/cmd/objdump/objdump_test.go
|
||||
|
||||
sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go
|
||||
|
||||
# TestCurrent fails because Current is not implemented on Darwin
|
||||
sed -i 's/TestCurrent/testCurrent/g' src/os/user/user_test.go
|
||||
sed -i 's/TestLookup/testLookup/g' src/os/user/user_test.go
|
||||
|
||||
touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./remove-tools-1.11.patch
|
||||
./ssl-cert-file-1.12.1.patch
|
||||
./remove-test-pie.patch
|
||||
./ssl-cert-file-1.13.patch
|
||||
./remove-test-pie-1.13.patch
|
||||
./creds-test.patch
|
||||
./go-1.9-skip-flaky-19608.patch
|
||||
./go-1.9-skip-flaky-20072.patch
|
||||
./remove-fhs-test-references.patch
|
||||
./skip-external-network-tests.patch
|
||||
./skip-nohup-tests.patch
|
||||
# breaks under load: https://github.com/golang/go/issues/25628
|
||||
./skip-test-extra-files-on-386.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
find . -name '*.orig' -exec rm {} ';'
|
||||
'';
|
||||
|
||||
GOOS = stdenv.targetPlatform.parsed.kernel.name;
|
||||
GOARCH = goarch stdenv.targetPlatform;
|
||||
# GOHOSTOS/GOHOSTARCH must match the building system, not the host system.
|
||||
@@ -187,12 +197,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
(cd src && ./run.bash --no-rebuild)
|
||||
(cd src && HOME=$TMPDIR GOCACHE=$TMPDIR/go-cache ./run.bash --no-rebuild)
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
rm -r pkg/{bootstrap,obj}
|
||||
rm -r pkg/obj
|
||||
# Contains the wrong perl shebang when cross compiling,
|
||||
# since it is not used for anything we can deleted as well.
|
||||
rm src/regexp/syntax/make_perl_groups.pl
|
||||
@@ -222,11 +232,11 @@ stdenv.mkDerivation rec {
|
||||
disallowedReferences = [ goBootstrap ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
branch = "1.11";
|
||||
branch = "1.13";
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ cstrahan orivej velovix mic92 rvolosatovs ];
|
||||
maintainers = with maintainers; [ cstrahan orivej velovix mic92 rvolosatovs kalbasit ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
@@ -61,7 +61,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
|
||||
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries
|
||||
# that run outside a nix server
|
||||
sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go
|
||||
|
||||
# Find the loader dynamically
|
||||
LOADER="$(find ${lib.getLib libc}/lib -name ld-linux\* | head -n 1)"
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
|
||||
index f63c94697c..f02eff7064 100644
|
||||
--- a/src/cmd/dist/test.go
|
||||
+++ b/src/cmd/dist/test.go
|
||||
@@ -574,29 +574,6 @@ func (t *tester) registerTests() {
|
||||
})
|
||||
}
|
||||
|
||||
- // Test internal linking of PIE binaries where it is supported.
|
||||
- if goos == "linux" && (goarch == "amd64" || goarch == "arm64") {
|
||||
- t.tests = append(t.tests, distTest{
|
||||
- name: "pie_internal",
|
||||
- heading: "internal linking of -buildmode=pie",
|
||||
- fn: func(dt *distTest) error {
|
||||
- t.addCmd(dt, "src", t.goTest(), "reflect", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60))
|
||||
- return nil
|
||||
- },
|
||||
- })
|
||||
- // Also test a cgo package.
|
||||
- if t.cgoEnabled {
|
||||
- t.tests = append(t.tests, distTest{
|
||||
- name: "pie_internal_cgo",
|
||||
- heading: "internal linking of -buildmode=pie",
|
||||
- fn: func(dt *distTest) error {
|
||||
- t.addCmd(dt, "src", t.goTest(), "os/user", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60))
|
||||
- return nil
|
||||
- },
|
||||
- })
|
||||
- }
|
||||
- }
|
||||
-
|
||||
// sync tests
|
||||
if goos != "js" { // js doesn't support -cpu=10
|
||||
t.tests = append(t.tests, distTest{
|
||||
@@ -0,0 +1,64 @@
|
||||
diff --git a/src/crypto/x509/root_cgo_darwin.go b/src/crypto/x509/root_cgo_darwin.go
|
||||
index 255a8d3525..a467255a54 100644
|
||||
--- a/src/crypto/x509/root_cgo_darwin.go
|
||||
+++ b/src/crypto/x509/root_cgo_darwin.go
|
||||
@@ -280,6 +280,8 @@ int CopyPEMRoots(CFDataRef *pemRoots, CFDataRef *untrustedPemRoots, bool debugDa
|
||||
import "C"
|
||||
import (
|
||||
"errors"
|
||||
+ "io/ioutil"
|
||||
+ "os"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@@ -295,6 +297,13 @@ func loadSystemRoots() (*CertPool, error) {
|
||||
buf := C.GoBytes(unsafe.Pointer(C.CFDataGetBytePtr(data)), C.int(C.CFDataGetLength(data)))
|
||||
roots := NewCertPool()
|
||||
roots.AppendCertsFromPEM(buf)
|
||||
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
|
||||
+ data, err := ioutil.ReadFile(file)
|
||||
+ if err == nil {
|
||||
+ roots.AppendCertsFromPEM(data)
|
||||
+ return roots, nil
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if C.CFDataGetLength(untrustedData) == 0 {
|
||||
return roots, nil
|
||||
diff --git a/src/crypto/x509/root_darwin.go b/src/crypto/x509/root_darwin.go
|
||||
index 2f6a8b8d60..b81889fe69 100644
|
||||
--- a/src/crypto/x509/root_darwin.go
|
||||
+++ b/src/crypto/x509/root_darwin.go
|
||||
@@ -92,6 +92,14 @@ func execSecurityRoots() (*CertPool, error) {
|
||||
verifyCh = make(chan rootCandidate)
|
||||
)
|
||||
|
||||
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
|
||||
+ data, err := ioutil.ReadFile(file)
|
||||
+ if err == nil {
|
||||
+ roots.AppendCertsFromPEM(data)
|
||||
+ return roots, nil
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
// Using 4 goroutines to pipe into verify-cert seems to be
|
||||
// about the best we can do. The verify-cert binary seems to
|
||||
// just RPC to another server with coarse locking anyway, so
|
||||
diff --git a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go
|
||||
index 48de50b4ea..750e12c6b4 100644
|
||||
--- a/src/crypto/x509/root_unix.go
|
||||
+++ b/src/crypto/x509/root_unix.go
|
||||
@@ -38,6 +38,13 @@ func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate
|
||||
|
||||
func loadSystemRoots() (*CertPool, error) {
|
||||
roots := NewCertPool()
|
||||
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
|
||||
+ data, err := ioutil.ReadFile(file)
|
||||
+ if err == nil {
|
||||
+ roots.AppendCertsFromPEM(data)
|
||||
+ return roots, nil
|
||||
+ }
|
||||
+ }
|
||||
|
||||
files := certFiles
|
||||
if f := os.Getenv(certFileEnv); f != "" {
|
||||
@@ -270,7 +270,7 @@ in rec {
|
||||
# Set JAVA_HOME automatically.
|
||||
mkdir -p $out/nix-support
|
||||
cat <<EOF > $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
postFixup = openjdk.postFixup or null;
|
||||
@@ -293,7 +293,7 @@ in rec {
|
||||
# gfortran readline bzip2 lzma pcre.dev curl ed ## WIP: fastr dependencies
|
||||
];
|
||||
postUnpack = ''
|
||||
cp ${stdenv.cc.cc}/include/c++/${stdenv.cc.cc.version}/stdlib.h \
|
||||
cp ${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc}/stdlib.h \
|
||||
$sourceRoot/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/include
|
||||
cp ${truffleMake} $TMP && mv *truffle.make truffle.make
|
||||
rm $sourceRoot/truffle/src/libffi/patches/others/0001-Add-mx-bootstrap-Makefile.patch
|
||||
@@ -318,7 +318,7 @@ in rec {
|
||||
--replace 'protected String compilerCommand = "cc";' 'protected String compilerCommand = "${stdenv.cc}/bin/cc";'
|
||||
# prevent cyclical imports caused by identical <include> names
|
||||
substituteInPlace sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/include/stdlib.h \
|
||||
--replace '# include <cstdlib>' '# include "${stdenv.cc.cc}/include/c++/${stdenv.cc.cc.version}/cstdlib"'
|
||||
--replace '# include <cstdlib>' '# include "${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc}/cstdlib"'
|
||||
# dragonegg can't seem to compile on nix, so let's not require it
|
||||
substituteInPlace sulong/mx.sulong/suite.py \
|
||||
--replace '"requireDragonegg" : True,' '"requireDragonegg" : False,'
|
||||
|
||||
@@ -72,7 +72,7 @@ let
|
||||
# Set JAVA_HOME automatically.
|
||||
mkdir -p $out/nix-support
|
||||
cat <<EOF > $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "2018_02_15";
|
||||
version = "2019_08_27";
|
||||
|
||||
in llvmPackages.stdenv.mkDerivation {
|
||||
|
||||
@@ -13,7 +13,7 @@ in llvmPackages.stdenv.mkDerivation {
|
||||
owner = "halide";
|
||||
repo = "Halide";
|
||||
rev = "release_${version}";
|
||||
sha256 = "14lmpbxydx7ii0pxds6rgq5vw4i6yfjsq0bai1l5wwpv1rnwmbxd";
|
||||
sha256 = "09xf8v9zyxx2fn6s1yzjkyzcf9zyzrg3x5vivgd2ljzbfhm8wh7n";
|
||||
};
|
||||
|
||||
patches = [ ./nix.patch ];
|
||||
@@ -58,7 +58,7 @@ in llvmPackages.stdenv.mkDerivation {
|
||||
description = "C++ based language for image processing and computational photography";
|
||||
homepage = "https://halide-lang.org";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
maintainers = [ maintainers.ck3d ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 40a685b7e..c452efd09 100644
|
||||
index 4ba384324..7e23038f7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -49,10 +49,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
@@ -75,10 +75,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
set(LLVM_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}")
|
||||
|
||||
|
||||
-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-as${CMAKE_EXECUTABLE_SUFFIX}" LLVM_AS)
|
||||
-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-nm${CMAKE_EXECUTABLE_SUFFIX}" LLVM_NM)
|
||||
-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/clang${CMAKE_EXECUTABLE_SUFFIX}" CLANG)
|
||||
@@ -14,7 +14,7 @@ index 40a685b7e..c452efd09 100644
|
||||
+find_program(LLVM_NM llvm-nm HINTS ${LLVM_TOOLS_BINARY_DIR})
|
||||
+find_program(CLANG clang HINTS ${LLVM_TOOLS_BINARY_DIR})
|
||||
+find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_TOOLS_BINARY_DIR})
|
||||
|
||||
|
||||
# LLVM doesn't appear to expose --system-libs via its CMake interface,
|
||||
# so we must shell out to llvm-config to find this info
|
||||
diff --git a/apps/linear_algebra/CMakeLists.txt b/apps/linear_algebra/CMakeLists.txt
|
||||
@@ -27,7 +27,7 @@ index 132c80e6a..36ce865f2 100644
|
||||
set(OpenBLAS_EXTRA_LIBS)
|
||||
- set(BLAS_VENDORS OpenBLAS ATLAS)
|
||||
+ set(BLAS_VENDORS OpenBLAS)
|
||||
|
||||
|
||||
# TODO
|
||||
# there are more vendors we could add here that support the cblas interface
|
||||
@@ -41,6 +41,7 @@ if (CBLAS_FOUND)
|
||||
@@ -39,17 +39,18 @@ index 132c80e6a..36ce865f2 100644
|
||||
endif()
|
||||
endforeach()
|
||||
diff --git a/apps/linear_algebra/tests/CMakeLists.txt b/apps/linear_algebra/tests/CMakeLists.txt
|
||||
index 4b95eb3bb..1daa97437 100644
|
||||
index cc02eb0a4..c20419a0d 100644
|
||||
--- a/apps/linear_algebra/tests/CMakeLists.txt
|
||||
+++ b/apps/linear_algebra/tests/CMakeLists.txt
|
||||
@@ -19,6 +19,6 @@ target_compile_options(test_halide_blas PRIVATE -Wno-unused-variable)
|
||||
@@ -19,7 +19,7 @@ target_compile_options(test_halide_blas PRIVATE -Wno-unused-variable)
|
||||
target_link_libraries(test_halide_blas
|
||||
PRIVATE
|
||||
halide_blas
|
||||
- cblas # XXX fragile
|
||||
+ ${BLAS_LIBRARIES}
|
||||
Halide
|
||||
${HALIDE_COMPILER_LIB}
|
||||
)
|
||||
--
|
||||
2.15.0
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{ stdenv, fetchgit, coreutils, ocaml, zlib, pcre, neko, camlp4 }:
|
||||
{ stdenv, fetchgit, coreutils, ocamlPackages, zlib, pcre, neko }:
|
||||
|
||||
let inherit (ocamlPackages) ocaml camlp4; in
|
||||
|
||||
let
|
||||
generic = { version, sha256, prePatch }:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
, pcre, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php
|
||||
, expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog, libkrb5
|
||||
, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
|
||||
, libxslt, freetype, gdb, git, perl, mysql, gmp, libyaml, libedit
|
||||
, libxslt, freetype, gdb, git, perl, libmysqlclient, gmp, libyaml, libedit
|
||||
, libvpx, imagemagick, fribidi, gperf, which, ocamlPackages
|
||||
}:
|
||||
|
||||
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[ cmake pkgconfig boost libunwind mysql.connector-c libmemcached pcre gdb git perl
|
||||
[ cmake pkgconfig boost libunwind libmysqlclient libmemcached pcre gdb git perl
|
||||
libevent gd curl libxml2 icu flex bison openssl zlib php expat libcap
|
||||
oniguruma libdwarf libmcrypt tbb gperftools bzip2 openldap readline
|
||||
libelf uwimap binutils cyrus_sasl pam glog libpng libxslt libkrb5
|
||||
|
||||
@@ -17,12 +17,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ bison flex ];
|
||||
|
||||
patches = fetchpatch {
|
||||
/* https://github.com/acpica/acpica/pull/389 */
|
||||
url = "https://github.com/acpica/acpica/commit/935ca65f7806a3ef9bd02a947e50f3a1f586ac67.patch";
|
||||
sha256 = "0jz4bakifphm425shbd1j99hldgy71m7scl8mwibm441d56l3ydf";
|
||||
};
|
||||
|
||||
installPhase =
|
||||
''
|
||||
install -d $out/bin
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkgconfig
|
||||
|
||||
, bison
|
||||
, flex
|
||||
, llvmPackages_8
|
||||
, opencl-clang
|
||||
, python
|
||||
, spirv-llvm-translator
|
||||
|
||||
, buildWithPatches ? true
|
||||
}:
|
||||
|
||||
let
|
||||
llvmPkgs = llvmPackages_8 // {
|
||||
inherit spirv-llvm-translator;
|
||||
};
|
||||
inherit (llvmPkgs) llvm;
|
||||
inherit (if buildWithPatches then opencl-clang else llvmPkgs) clang clang-unwrapped spirv-llvm-translator;
|
||||
inherit (stdenv.lib) getVersion optional optionals versionOlder versions;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "intel-graphics-compiler";
|
||||
version = "1.0.2878";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "intel-graphics-compiler";
|
||||
rev = "igc-${version}";
|
||||
sha256 = "0rgij1013fy2x2szfchy3z6390mjfqw3nz4zprcb5v2v6mpvcj4l";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ clang cmake bison flex llvm python ];
|
||||
|
||||
buildInputs = [ clang opencl-clang spirv-llvm-translator ];
|
||||
|
||||
# checkInputs = [ lit pythonPackages.nose ];
|
||||
|
||||
# FIXME: How do we run the test suite?
|
||||
# https://github.com/intel/intel-graphics-compiler/issues/98
|
||||
doCheck = false;
|
||||
|
||||
# Handholding the braindead build script
|
||||
# We put this in a derivation because the cmake requires an absolute path
|
||||
prebuilds = stdenv.mkDerivation {
|
||||
name = "igc-cclang-prebuilds";
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
ln -s ${clang}/bin/clang $out/
|
||||
ln -s clang $out/clang-${versions.major (getVersion clang)}
|
||||
ln -s ${opencl-clang}/lib/* $out/
|
||||
ln -s ${clang-unwrapped}/lib/clang/${getVersion clang}/include/opencl-c.h $out/
|
||||
'';
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCCLANG_BUILD_PREBUILDS=ON"
|
||||
"-DCCLANG_BUILD_PREBUILDS_DIR=${prebuilds}"
|
||||
"-DIGC_PREFERRED_LLVM_VERSION=${getVersion llvm}"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/intel/intel-graphics-compiler;
|
||||
description = "LLVM-based compiler for OpenCL targeting Intel Gen graphics hardware";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ gloaming ];
|
||||
};
|
||||
}
|
||||
@@ -7,11 +7,11 @@ with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
pname = "intercal";
|
||||
version = "0.30";
|
||||
version = "0.31";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://catb.org/esr/intercal/${pname}-${version}.tar.gz";
|
||||
sha256 = "058ppvvgz9r5603ia9jkknbrciypgg4hjbczrv9v1d9w3ak652xk";
|
||||
sha256 = "1z2gpa5rbqb7jscqlf258k0b0jc7d2zkyipb5csjpj6d3sw45n4k";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{stdenv, fetchFromGitHub, which, m4, python, bison, flex, llvmPackages,
|
||||
testedTargets ? ["sse2" "host"] # the default test target is sse4, but that is not supported by all Hydra agents
|
||||
testedTargets ? ["sse2"] # the default test target is sse4, but that is not supported by all Hydra agents
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
# there are missing dependencies in the Makefile, causing sporadic build failures
|
||||
enableParallelBuilding = false;
|
||||
|
||||
doCheck = true;
|
||||
doCheck = stdenv.isLinux;
|
||||
|
||||
buildInputs = with llvmPackages; [
|
||||
which
|
||||
@@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
|
||||
homepage = https://ispc.github.io/ ;
|
||||
description = "Intel 'Single Program, Multiple Data' Compiler, a vectorised language";
|
||||
license = licenses.bsd3;
|
||||
platforms = ["x86_64-linux"]; # TODO: buildable on more platforms?
|
||||
platforms = ["x86_64-linux" "x86_64-darwin"]; # TODO: buildable on more platforms?
|
||||
maintainers = [ maintainers.aristid ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, unzip
|
||||
, jdk
|
||||
, ant
|
||||
, makeWrapper
|
||||
, jre
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jasmin";
|
||||
version = "2.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/jasmin/jasmin-${version}/jasmin-${version}.zip";
|
||||
sha256 = "17a41vr96glcdrdbk88805wwvv1r6w8wg7if23yhd0n6rrl0r8ga";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip jdk ant makeWrapper ];
|
||||
|
||||
buildPhase = "ant all";
|
||||
installPhase =
|
||||
''
|
||||
install -Dm644 jasmin.jar $out/share/java/jasmin.jar
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${jre}/bin/java $out/bin/jasmin \
|
||||
--add-flags "-jar $out/share/java/jasmin.jar"
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
minimal-module = callPackage ./test-assemble-hello-world {};
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "An assembler for the Java Virtual Machine";
|
||||
homepage = "http://jasmin.sourceforge.net/";
|
||||
downloadPage = "https://sourceforge.net/projects/jasmin/files/latest/download";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ fgaz ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
.class public HelloWorld
|
||||
.super java/lang/Object
|
||||
|
||||
;
|
||||
; standard initializer (calls java.lang.Object's initializer)
|
||||
;
|
||||
.method public <init>()V
|
||||
aload_0
|
||||
invokenonvirtual java/lang/Object/<init>()V
|
||||
return
|
||||
.end method
|
||||
|
||||
;
|
||||
; main() - prints out Hello World
|
||||
;
|
||||
.method public static main([Ljava/lang/String;)V
|
||||
.limit stack 2 ; up to two items can be pushed
|
||||
|
||||
; push System.out onto the stack
|
||||
getstatic java/lang/System/out Ljava/io/PrintStream;
|
||||
|
||||
; push a string onto the stack
|
||||
ldc "Hello World!"
|
||||
|
||||
; call the PrintStream.println() method.
|
||||
invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
|
||||
|
||||
; done
|
||||
return
|
||||
.end method
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{ stdenv, jasmin, jre }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "jasmin-test-assemble-hello-world";
|
||||
meta.timeout = 60;
|
||||
buildCommand = ''
|
||||
${jasmin}/bin/jasmin ${./HelloWorld.j}
|
||||
${jre}/bin/java HelloWorld | grep "Hello World"
|
||||
touch $out
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -7,12 +7,17 @@
|
||||
|
||||
let drv = stdenv.mkDerivation rec {
|
||||
pname = "jetbrainsjdk";
|
||||
version = "164";
|
||||
version = "485.1";
|
||||
|
||||
src = if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = "https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbrsdk-11_0_2-linux-x64-b${version}.tar.gz";
|
||||
sha256 = "121yzgvkfx7lq0k9s8wjnhz09a564br5y7zlkxgh191sbm2i7zdi";
|
||||
url = "https://bintray.com/jetbrains/intellij-jbr/download_file?file_path=jbrsdk-11_0_4-linux-x64-b${version}.tar.gz";
|
||||
sha256 = "18jnn0dra9nsnyllwq0ljxzr58k2pg8d0kg10y39vnxwccic4f76";
|
||||
}
|
||||
else if stdenv.hostPlatform.system == "x86_64-darwin" then
|
||||
fetchurl {
|
||||
url = "https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbrsdk-11_0_2-osx-x64-b${version}.tar.gz";
|
||||
sha256 = "1ly6kf59knvzbr2pjkc9fqyzfs28pdvnqg5pfffr8zp14xm44zmd";
|
||||
}
|
||||
else
|
||||
throw "unsupported system: ${stdenv.hostPlatform.system}";
|
||||
@@ -24,24 +29,23 @@ let drv = stdenv.mkDerivation rec {
|
||||
installPhase = ''
|
||||
cd ..
|
||||
|
||||
mv $sourceRoot $out
|
||||
jrePath=$out/jre
|
||||
mv $sourceRoot/jbrsdk $out
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
postFixup = lib.optionalString (!stdenv.isDarwin) ''
|
||||
find $out -type f -perm -0100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$rpath" {} \;
|
||||
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
|
||||
'';
|
||||
|
||||
rpath = lib.makeLibraryPath ([
|
||||
rpath = lib.optionalString (!stdenv.isDarwin) (lib.makeLibraryPath ([
|
||||
stdenv.cc.cc stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt libGL
|
||||
alsaLib fontconfig freetype pango gtk2 cairo gdk-pixbuf atk zlib
|
||||
(placeholder "out")
|
||||
] ++ (with xorg; [
|
||||
libX11 libXext libXtst libXi libXp libXt libXrender libXxf86vm
|
||||
])) + ":${placeholder "out"}/lib/jli";
|
||||
])) + ":${placeholder "out"}/lib/jli");
|
||||
|
||||
passthru.home = drv;
|
||||
|
||||
@@ -61,6 +65,6 @@ let drv = stdenv.mkDerivation rec {
|
||||
homepage = "https://bintray.com/jetbrains/intellij-jdk/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = with platforms; [ "x86_64-linux" ];
|
||||
platforms = with platforms; [ "x86_64-linux" "x86_64-darwin" ];
|
||||
};
|
||||
}; in drv
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "jikes-1.22";
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/jikes/jikes-1.22.tar.bz2;
|
||||
sha256 = "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c";
|
||||
};
|
||||
|
||||
meta = {
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
license = stdenv.lib.licenses.epl10;
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user