Merge branch 'master' into staging-next

There ver very many conflicts, basically all due to
name -> pname+version.  Fortunately, almost everything was auto-resolved
by kdiff3, and for now I just fixed up a couple evaluation problems,
as verified by the tarball job.  There might be some fallback to these
conflicts, but I believe it should be minimal.

Hydra nixpkgs: ?compare=1538299
This commit is contained in:
Vladimír Čunát
2019-08-24 08:55:37 +02:00
865 changed files with 29587 additions and 14316 deletions
@@ -1,14 +1,14 @@
{ stdenv, fetchFromGitHub, cargo, rustc, autoreconfHook, jdk, glib, xulrunner, zip, pkgconfig, npapi_sdk, bash, bc }:
stdenv.mkDerivation rec {
pname = "icedtea-web";
pname = "adoptopenjdk-icedtea-web";
version = "1.8.3";
src = fetchFromGitHub {
owner = "AdoptOpenJDK";
repo = "IcedTea-Web";
rev = "${pname}-${version}";
rev = "icedtea-web-${version}";
sha256 = "0bm5k11i2vgb54ch1bawsmjbwnqnp04saadwm2f2mggmmdc6b1qq";
};
@@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
patchPhase = ''
substituteInPlace ./configure \
--replace '|8.9.0' '|8.9.0|8.9.1' \
--replace '{toolprefix}gcc' '{toolprefix}cc'
'';
+36 -49
View File
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, fetchpatch, libuuid, python2, iasl }:
{ stdenv, fetchgit, fetchpatch, libuuid, python3, iasl, bc }:
let
pythonEnv = python2.withPackages(ps: [ps.tkinter]);
pythonEnv = python3.withPackages (ps: [ps.tkinter]);
targetArch = if stdenv.isi686 then
"IA32"
@@ -13,80 +13,67 @@ else
throw "Unsupported architecture";
edk2 = stdenv.mkDerivation {
name = "edk2-2017-12-05";
pname = "edk2";
version = "201905";
src = fetchFromGitHub {
owner = "tianocore";
repo = "edk2";
rev = "f71a70e7a4c93a6143d7bad8ab0220a947679697";
sha256 = "0k48xfwxcgcim1bhkggc19hilvsxsf5axvvcpmld0ng1fcfg0cr6";
# submodules
src = fetchgit {
url = "https://github.com/tianocore/edk2";
rev = "edk2-stable${edk2.version}";
sha256 = "0fk40h4nj4qg8shg0yd1zj4iyspslms5fx95ysi04akv90k5sqkn";
};
patches = [
(fetchpatch {
name = "short-circuit-the-transfer-of-an-empty-S3_CONTEXT.patch";
url = "https://github.com/tianocore/edk2/commit/9e2a8e928995c3b1bb664b73fd59785055c6b5f6.diff";
sha256 = "0x24npijhgpjpsn3n74wayf8qcbaj97vi4z2iyf4almavqq8qaz4";
})
];
buildInputs = [ libuuid pythonEnv ];
makeFlags = "-C BaseTools";
makeFlags = [ "-C BaseTools" ];
hardeningDisable = [ "format" "fortify" ];
installPhase = ''
mkdir -vp $out
mv -v BaseTools $out
mv -v EdkCompatibilityPkg $out
mv -v edksetup.sh $out
'';
enableParallelBuilding = true;
meta = {
meta = with stdenv.lib; {
description = "Intel EFI development kit";
homepage = https://sourceforge.net/projects/edk2/;
license = stdenv.lib.licenses.bsd2;
branch = "UDK2017";
platforms = ["x86_64-linux" "i686-linux" "aarch64-linux"];
license = licenses.bsd2;
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
};
passthru = {
setup = projectDscPath: attrs: {
buildInputs = [ pythonEnv ] ++
stdenv.lib.optionals (attrs ? buildInputs) attrs.buildInputs;
mkDerivation = projectDscPath: attrs: stdenv.mkDerivation ({
inherit (edk2) src;
configurePhase = ''
mkdir -v Conf
buildInputs = [ bc pythonEnv ] ++ attrs.buildInputs or [];
cp ${edk2}/BaseTools/Conf/target.template Conf/target.txt
sed -i Conf/target.txt \
-e 's|Nt32Pkg/Nt32Pkg.dsc|${projectDscPath}|' \
-e 's|MYTOOLS|GCC49|' \
-e 's|IA32|${targetArch}|' \
-e 's|DEBUG|RELEASE|'\
cp ${edk2}/BaseTools/Conf/tools_def.template Conf/tools_def.txt
sed -i Conf/tools_def.txt \
-e 's|DEFINE GCC48_IA32_PREFIX = /usr/bin/|DEFINE GCC48_IA32_PREFIX = ""|' \
-e 's|DEFINE GCC48_X64_PREFIX = /usr/bin/|DEFINE GCC48_X64_PREFIX = ""|' \
-e 's|DEFINE UNIX_IASL_BIN = /usr/bin/iasl|DEFINE UNIX_IASL_BIN = ${iasl}/bin/iasl|'
export WORKSPACE="$PWD"
export EFI_SOURCE="$PWD/EdkCompatibilityPkg"
prePatch = ''
rm -rf BaseTools
ln -sv ${edk2}/BaseTools BaseTools
ln -sv ${edk2}/EdkCompatibilityPkg EdkCompatibilityPkg
. ${edk2}/edksetup.sh BaseTools
'';
buildPhase = "
build
";
configurePhase = ''
runHook preConfigure
export WORKSPACE="$PWD"
. ${edk2}/edksetup.sh BaseTools
runHook postConfigure
'';
installPhase = "mv -v Build/*/* $out";
} // (removeAttrs attrs [ "buildInputs" ] );
buildPhase = ''
runHook preBuild
build -a ${targetArch} -b RELEASE -t GCC5 -p ${projectDscPath} -n $NIX_BUILD_CORES $buildFlags
runHook postBuild
'';
installPhase = ''
runHook preInstall
mv -v Build/*/* $out
runHook postInstall
'';
} // removeAttrs attrs [ "buildInputs" ]);
};
};
+2 -2
View File
@@ -3,11 +3,11 @@
stdenvNoCC.mkDerivation rec {
name = "fasm-bin-${version}";
version = "1.73.15";
version = "1.73.16";
src = fetchurl {
url = "https://flatassembler.net/fasm-${version}.tgz";
sha256 = "0yc30y4hkr226629347gcrzi153f10hcp5q7bm3q6ir3gx35xa39";
sha256 = "1jaqm7w458ny37fsw3fln17kw31rcsk8kyadci45qcbw6jspmn7k";
};
installPhase = ''
@@ -0,0 +1,21 @@
{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig }:
stdenv.mkDerivation rec {
pname = "flux";
version = "2013-09-20";
src = fetchFromGitHub {
owner = "deniskropp";
repo = pname;
rev = "e45758aa9384b9740ff021ea952399fd113eb0e9";
sha256 = "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];
meta = with lib; {
description = "An interface description language used by DirectFB";
homepage = "https://github.com/deniskropp/flux";
license = licenses.mit;
};
}
+2 -2
View File
@@ -37,7 +37,7 @@ assert langGo -> langCC;
with stdenv.lib;
with builtins;
let version = "9.1.0";
let version = "9.2.0";
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
@@ -131,7 +131,7 @@ stdenv.mkDerivation ({
src = fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
sha256 = "1817nc2bqdc251k0lpc51cimna7v68xjrnvqzvc50q3ax4s6i9kr";
sha256 = "01mj3yk7z49i49168hg2cg7qs4bsccrrnv7pjmbdlf8j2a7z0vpa";
};
inherit patches;
@@ -0,0 +1,133 @@
{ stdenv, requireFile, perl, unzip, glibc, zlib, gdk-pixbuf, xorg, glib, fontconfig, freetype, cairo, pango, gtk3, gtk2, ffmpeg, libGL, atk, alsaLib, libav_0_8, setJavaClassPath }:
let
graalvm8-ee = stdenv.mkDerivation rec {
pname = "graalvm8-ee";
version = "19.1.1";
srcs = [
(requireFile {
name = "graalvm-ee-linux-amd64-${version}.tar.gz";
sha256 = "1ayg4chiw08jbrivmsylh6275sn0ygzc0iaic28fk7hhw5dc6r2f";
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
})
(requireFile {
name = "native-image-installable-svm-svmee-linux-amd64-${version}.jar";
sha256 = "1mvc4id193gl482fnjcgh4dz29ifqwigqq68ib0i1p3ks1nnj717";
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
})
(requireFile {
name = "python-installable-svm-svmee-linux-amd64-${version}.jar";
sha256 = "0q7sggqk5myad053dsfw2i1n8v4wspahg1ac7zr3y3srqvdb0xfp";
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
})
(requireFile {
name = "ruby-installable-svm-svmee-linux-amd64-${version}.jar";
sha256 = "1xax1bg155d74jhv7h0qb7vbc95jy4wm4bvbpvr76ivzn7qaml6j";
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
})
];
nativeBuildInputs = [ unzip perl ];
unpackPhase = ''
unpack_jar() {
jar=$1
unzip $jar -d $out
perl -ne 'use File::Path qw(make_path);
use File::Basename qw(dirname);
if (/^(.+) = (.+)$/) {
make_path dirname("$ENV{out}/$1");
system "ln -s $2 $ENV{out}/$1";
}' $out/META-INF/symlinks
perl -ne 'if (/^(.+) = ([r-])([w-])([x-])([r-])([w-])([x-])([r-])([w-])([x-])$/) {
my $mode = ($2 eq 'r' ? 0400 : 0) + ($3 eq 'w' ? 0200 : 0) + ($4 eq 'x' ? 0100 : 0) +
($5 eq 'r' ? 0040 : 0) + ($6 eq 'w' ? 0020 : 0) + ($7 eq 'x' ? 0010 : 0) +
($8 eq 'r' ? 0004 : 0) + ($9 eq 'w' ? 0002 : 0) + ($10 eq 'x' ? 0001 : 0);
chmod $mode, "$ENV{out}/$1";
}' $out/META-INF/permissions
rm -rf $out/META-INF
}
mkdir -p $out
arr=($srcs)
tar xf ''${arr[0]} -C $out --strip-components=1
unpack_jar ''${arr[1]}
unpack_jar ''${arr[2]}
unpack_jar ''${arr[3]}
'';
installPhase = ''
# BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
substituteInPlace $out/jre/lib/security/java.security \
--replace file:/dev/random file:/dev/./urandom \
--replace NativePRNGBlocking SHA1PRNG
# provide libraries needed for static compilation
for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do
ln -s $f $out/jre/lib/svm/clibraries/linux-amd64/$(basename $f)
done
'';
dontStrip = true;
preFixup = ''
# 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
EOF
'';
postFixup = ''
rpath="$out/jre/lib/amd64/jli:$out/jre/lib/amd64/server:$out/jre/lib/amd64:${
stdenv.lib.strings.makeLibraryPath [ glibc xorg.libXxf86vm xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXrender
glib zlib alsaLib fontconfig freetype pango gtk3 gtk2 cairo gdk-pixbuf atk ffmpeg libGL ]}"
for f in $(find $out -type f -perm -0100); do
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f" || true
patchelf --set-rpath "$rpath" "$f" || true
done
for f in $(find $out -type f -perm -0100); do
if ldd "$f" | fgrep 'not found'; then echo "in file $f"; fi
done
'';
propagatedBuildInputs = [ setJavaClassPath zlib ]; # $out/bin/native-image needs zlib to build native executables
doInstallCheck = true;
installCheckPhase = ''
echo ${stdenv.lib.escapeShellArg ''
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
''} > HelloWorld.java
$out/bin/javac HelloWorld.java
# run on JVM with Graal Compiler
$out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld
$out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World'
# Ahead-Of-Time compilation
$out/bin/native-image --no-server HelloWorld
./helloworld
./helloworld | fgrep 'Hello World'
# Ahead-Of-Time compilation with --static
$out/bin/native-image --no-server --static HelloWorld
./helloworld
./helloworld | fgrep 'Hello World'
'';
passthru.home = graalvm8-ee;
meta = with stdenv.lib; {
homepage = https://www.graalvm.org/;
description = "High-Performance Polyglot VM";
license = licenses.unfree;
maintainers = with maintainers; [ volth hlolli ];
platforms = [ "x86_64-linux" ];
};
};
in
graalvm8-ee
+2 -2
View File
@@ -1,8 +1,8 @@
import ./shared.nix {
majorVersion = "1";
minorVersion = "0";
maintenanceVersion = "3";
src_sha256 = "0666chsc19wx02k5m1yilf6wbc9bw27ay8p1d00jkh8m0jkrpf7l";
maintenanceVersion = "4";
src_sha256 = "1dfx68wbrrzpbh74rla7i2g3r5z6wa1pxq3ahyfm5m27vfyjbkhg";
libuvVersion = "ed3700c849289ed01fe04273a7bf865340b2bd7e";
libuvSha256 = "137w666zsjw1p0ma3lf94d75hr1q45sgkfmbizkyji2qm57cnxjs";
+2 -2
View File
@@ -1,8 +1,8 @@
import ./shared.nix {
majorVersion = "1";
minorVersion = "1";
maintenanceVersion = "0";
src_sha256 = "08fyck4qcdv9nnrdqh1wb7lb8pkkikh67xx5lc872sjl9w3p0sak";
maintenanceVersion = "1";
src_sha256 = "1yqjd0n42xf9hzxpvc9vysyjj98p42by216jkdqakdy7dkjcmnhq";
libuvVersion = "2348256acf5759a544e5ca7935f638d2bc091d60";
libuvSha256 = "1363f4vqayfcv5zqg07qmzjff56yhad74k16c22ian45lram8mv8";
+2 -2
View File
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
buildInputs = [ gmp perl ];
makeFlags = "PREFIX=$(out)";
makeFlags = [ "PREFIX=$(out)" ] ++ stdenv.lib.optionals stdenv.isDarwin [ "CC=cc" ];
src = fetchurl {
url = "https://github.com/kfl/mosml/archive/ver-${version}.tar.gz";
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
'';
homepage = https://mosml.org/;
license = licenses.gpl2;
platforms = platforms.linux;
platforms = platforms.unix;
maintainers = with maintainers; [ vaibhavsagar ];
};
}
+22 -31
View File
@@ -2,58 +2,44 @@
, boost, python3, eigen
, icestorm, trellis
# TODO(thoughtpolice) Currently the GUI build seems broken at runtime on my
# laptop (and over a remote X server on my server...), so mark it broken for
# now, with intent to fix later.
, enableGui ? false
, qtbase, wrapQtAppsHook
, enableGui ? true
, wrapQtAppsHook
, qtbase
}:
let
boostPython = boost.override { python = python3; enablePython = true; };
# This is a massive hack. For now, Trellis doesn't really support
# installation through an already-built package; you have to build it once to
# get the tools, then reuse the build directory to build nextpnr -- the
# 'install' phase doesn't install everything it needs. This will be fixed in
# the future but for now we can do this horrific thing.
trellisRoot = trellis.overrideAttrs (_: {
installPhase = ''
mkdir -p $out
cp *.so ..
cd ../../.. && cp -R trellis database $out/
'';
});
in
stdenv.mkDerivation rec {
with stdenv; mkDerivation rec {
pname = "nextpnr";
version = "2019.08.10";
version = "2019.08.21";
src = fetchFromGitHub {
owner = "yosyshq";
repo = "nextpnr";
rev = "3f26cf50767143e48d29ae691b2a0052c359eb15";
sha256 = "1gv84svw56ass9idbzh17h3yxkk9ydr40ijf9w72gf72rbixszdr";
rev = "c192ba261d77ad7f0a744fb90b01e4a5b63938c4";
sha256 = "0g2ar1z89b31qw5vgqj2rrcv9rzncs94184dgcsrz19p866654mf";
};
nativeBuildInputs
= [ cmake ]
++ (stdenv.lib.optional enableGui wrapQtAppsHook);
++ (lib.optional enableGui wrapQtAppsHook);
buildInputs
= [ boostPython python3 eigen ]
++ (stdenv.lib.optional enableGui qtbase);
++ (lib.optional enableGui qtbase);
enableParallelBuilding = true;
cmakeFlags =
[ "-DARCH=generic;ice40;ecp5"
"-DICEBOX_ROOT=${icestorm}/share/icebox"
"-DTRELLIS_ROOT=${trellisRoot}/trellis"
"-DTRELLIS_ROOT=${trellis}/share/trellis"
"-DPYTRELLIS_LIBDIR=${trellis}/lib/trellis"
"-DUSE_OPENMP=ON"
# warning: high RAM usage
"-DSERIALIZE_CHIPDB=OFF"
# use PyPy for icestorm if enabled
"-DPYTHON_EXECUTABLE=${icestorm.pythonInterp}"
] ++ (stdenv.lib.optional (!enableGui) "-DBUILD_GUI=OFF");
] ++ (lib.optional (!enableGui) "-DBUILD_GUI=OFF");
# Fix the version number. This is a bit stupid (and fragile) in practice
# but works ok. We should probably make this overrideable upstream.
@@ -62,13 +48,18 @@ stdenv.mkDerivation rec {
--replace 'git log -1 --format=%h' 'echo ${substring 0 11 src.rev}'
'';
meta = with stdenv.lib; {
postFixup = lib.optionalString enableGui ''
wrapQtApp $out/bin/nextpnr-generic
wrapQtApp $out/bin/nextpnr-ice40
wrapQtApp $out/bin/nextpnr-ecp5
'';
meta = with lib; {
description = "Place and route tool for FPGAs";
homepage = https://github.com/yosyshq/nextpnr;
license = licenses.isc;
platforms = platforms.linux;
maintainers = with maintainers; [ thoughtpolice ];
broken = enableGui;
platforms = platforms.all;
maintainers = with maintainers; [ thoughtpolice emily ];
};
}
@@ -59,12 +59,14 @@
pkgsBuildHost = pkgsBuildBuild // { targetPackages.stdenv = llvmPackages_5.stdenv; };
pkgsBuildTarget = pkgsBuildTarget // { targetPackages.stdenv = llvmPackages_5.stdenv; };
});
rustfmt = self.callPackage ./rustfmt.nix { inherit Security; };
cargo = self.callPackage ./cargo.nix {
# Use boot package set to break cycle
rustPlatform = bootRustPlatform;
inherit CoreFoundation Security;
};
clippy = self.callPackage ./clippy.nix { inherit Security; };
rls = self.callPackage ./rls { inherit CoreFoundation Security; };
});
};
}
@@ -0,0 +1,45 @@
{ stdenv, fetchFromGitHub, rustPlatform
, openssh, openssl, pkgconfig, cmake, zlib, curl, libiconv
, CoreFoundation, Security }:
rustPlatform.buildRustPackage rec {
pname = "rls";
inherit (rustPlatform.rust.rustc) src version;
# changes hash of vendor directory otherwise
dontUpdateAutotoolsGnuConfigScripts = true;
cargoVendorDir = "vendor";
preBuild = ''
pushd src/tools/rls
# client tests are flaky
rm tests/client.rs
'';
# a nightly compiler is required unless we use this cheat code.
RUSTC_BOOTSTRAP=1;
# rls-rustc links to rustc_private crates
CARGO_BUILD_RUSTFLAGS = if stdenv.isDarwin then "-C rpath" else null;
nativeBuildInputs = [ pkgconfig cmake ];
buildInputs = [ openssh openssl curl zlib libiconv ]
++ (stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Security ]);
doCheck = true;
preInstall = "popd";
doInstallCheck = true;
installCheckPhase = ''
$out/bin/rls --version
'';
meta = with stdenv.lib; {
description = "Rust Language Server - provides information about Rust programs to IDEs and other tools";
homepage = https://github.com/rust-lang/rls/;
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ symphorien ];
platforms = platforms.all;
};
}
@@ -0,0 +1,33 @@
{ stdenv, rustPlatform, Security }:
rustPlatform.buildRustPackage rec {
name = "rustfmt-${version}";
inherit (rustPlatform.rust.rustc) version src;
# the rust source tarball already has all the dependencies vendored, no need to fetch them again
cargoVendorDir = "vendor";
preBuild = "pushd src/tools/rustfmt";
preInstall = "popd";
# changes hash of vendor directory otherwise
dontUpdateAutotoolsGnuConfigScripts = true;
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
# As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler
RUSTC_BOOTSTRAP = 1;
# we run tests in debug mode so tests look for a debug build of
# rustfmt. Anyway this adds nearly no compilation time.
preCheck = ''
cargo build
'';
meta = with stdenv.lib; {
description = "A tool for formatting Rust code according to style guidelines";
homepage = https://github.com/rust-lang-nursery/rustfmt;
license = with licenses; [ mit asl20 ];
maintainers = with maintainers; [ globin basvandijk ];
platforms = platforms.all;
};
}
+5 -8
View File
@@ -33,7 +33,7 @@
}:
let
v_base = "5.0.1";
v_base = "5.0.2";
version = "${v_base}-RELEASE";
version_friendly = "${v_base}";
@@ -51,7 +51,7 @@ let
# For more inforation, see: https://github.com/apple/swift/pull/3594#issuecomment-234169759
clang = fetch {
repo = "swift-clang";
sha256 = "1ap26425zhn2sdw3m9snyrqhi4phv2fgblyv9wp8xppjlnjkax9k";
sha256 = "046p7f4044ls8hhgklsz32md5jvxkaaim1d75n0fmnwap6di3n1q";
};
llvm = fetch {
repo = "swift-llvm";
@@ -83,16 +83,16 @@ let
};
foundation = fetch {
repo = "swift-corelibs-foundation";
sha256 = "11w0iapccrk13hjbrwylq8g71znrncnc3mrm345gvnjfgz08ffaq";
sha256 = "1wys4xh7f6c7yjf210x41n2krmyi2qj1wpxbv0p48d230va1azj1";
};
libdispatch = fetch {
repo = "swift-corelibs-libdispatch";
sha256 = "1mgzsq3nfzbkssfkswzvvjgsbv2fx36i1r83d4nzw3di8spxmg32";
sha256 = "0chnb0d4xjyn9wnc8bgimd5ji5igfyq891flgnqpfwr4y26496c1";
fetchSubmodules = true;
};
swift = fetch {
repo = "swift";
sha256 = "02bv47pd0k0xy4k7q6c3flwxwkm2palnzvpr4w3nmvqk0flrbsq6";
sha256 = "0fsq1y8dz4ssn90akvzj36cqyblalb09bjzy4ikqn67mb5x99wpb";
};
};
@@ -248,9 +248,6 @@ stdenv.mkDerivation rec {
PREFIX=''${out/#\/}
substituteInPlace swift-corelibs-xctest/build_script.py \
--replace usr "$PREFIX"
substituteInPlace swiftpm/Utilities/bootstrap \
--replace \"usr\" \"$PREFIX\" \
--replace usr/lib "$PREFIX/lib"
'';
buildPhase = builder;
+7 -8
View File
@@ -1,14 +1,14 @@
{ stdenv, fetchFromGitHub, glfw, freetype, curl }:
{ stdenv, fetchFromGitHub, glfw, freetype, openssl }:
stdenv.mkDerivation rec {
pname = "vlang";
version = "0.1.16";
version = "0.1.18";
src = fetchFromGitHub {
owner = "vlang";
repo = "v";
rev = "${version}";
sha256 = "08zgwy9ac3wa5ixy8rdw6izpn1n1c3ydb9rl8z8graw0bgv719ma";
sha256 = "0js92v2r1h4vaaha3z1spgi7qynlmr9vls41gxp284w4yhnjzv15";
};
# V compiler source translated to C for bootstrap.
@@ -16,18 +16,17 @@ stdenv.mkDerivation rec {
owner = "vlang";
repo = "vc";
rev = "${version}";
sha256 = "0k6c7v3r3cirypsqbaq10qlgg41v19rsnc1ygam4il2p8rsmfwz3";
sha256 = "0qx1drs1hr94w7vaaq5w8mkq7j1d3biffnmxkyz63yv8573k03bj";
};
enableParallelBuilding = true;
buildInputs = [ glfw freetype curl ];
buildInputs = [ glfw freetype openssl ];
buildPhase = ''
runHook preBuild
cc -std=gnu11 -w -o v $vc/v.c -lm
cc -std=gnu11 $CFLAGS -w -o v $vc/v.c -lm $LDFLAGS
./v -prod -o v compiler
# -fPIC -pie required for examples/hot_code_reloading
make CFLAGS+="-fPIC -pie" thirdparty
make thirdparty
runHook postBuild
'';
+11 -7
View File
@@ -8,14 +8,14 @@ with builtins;
stdenv.mkDerivation rec {
pname = "yosys";
version = "2019.08.13";
version = "2019.08.21";
srcs = [
(fetchFromGitHub {
owner = "yosyshq";
repo = "yosys";
rev = "19d6b8846f55b4c7be705619f753bec86deadac8";
sha256 = "185sbkxajx3k9j03n0cxq2qvzwfwdbcxp19h8vnk7ghd5y9gp602";
rev = "fe1b2337fd7950e1d563be5b8ccbaa81688261e4";
sha256 = "0z7sngc2z081yyhzh8c2kchg48sp2333hn1wa94q5vsgnyzlqrdw";
name = "yosys";
})
@@ -40,10 +40,14 @@ stdenv.mkDerivation rec {
patchPhase = ''
substituteInPlace ../yosys-abc/Makefile \
--replace 'CC := gcc' ""
--replace 'CC := gcc' "" \
--replace 'CXX := g++' ""
substituteInPlace ./Makefile \
--replace 'CXX = clang' "" \
--replace 'ABCMKARGS = CC="$(CXX)"' 'ABCMKARGS =' \
--replace 'LD = clang++' 'LD = $(CXX)' \
--replace 'CXX = gcc' "" \
--replace 'LD = gcc' 'LD = $(CXX)' \
--replace 'ABCMKARGS = CC="$(CXX)" CXX="$(CXX)"' 'ABCMKARGS =' \
--replace 'echo UNKNOWN' 'echo ${substring 0 10 (elemAt srcs 0).rev}'
'';
@@ -71,7 +75,7 @@ stdenv.mkDerivation rec {
'';
homepage = http://www.clifford.at/yosys/;
license = stdenv.lib.licenses.isc;
maintainers = with stdenv.lib.maintainers; [ shell thoughtpolice ];
platforms = stdenv.lib.platforms.unix;
maintainers = with stdenv.lib.maintainers; [ shell thoughtpolice emily ];
platforms = stdenv.lib.platforms.all;
};
}