Merge pull request #36885 from obsidiansystems/meta-host-prepare
treewide: Prepare for #34444
This commit is contained in:
commit
62ca2316a4
|
@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
|
||||||
mkdir -p $out/share/icons
|
mkdir -p $out/share/icons
|
||||||
cp ${icon} $out/share/icons/robomongo.png
|
cp ${icon} $out/share/icons/robomongo.png
|
||||||
|
|
||||||
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $BASEDIR/bin/robo3t
|
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $BASEDIR/bin/robo3t
|
||||||
|
|
||||||
mkdir $out/bin
|
mkdir $out/bin
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
|
||||||
meta = {
|
meta = {
|
||||||
homepage = https://robomongo.org/;
|
homepage = https://robomongo.org/;
|
||||||
description = "Query GUI for mongodb";
|
description = "Query GUI for mongodb";
|
||||||
platforms = stdenv.lib.intersectLists stdenv.lib.platforms.linux stdenv.lib.platforms.x86_64;
|
platforms = [ "x86_64-linux" ];
|
||||||
license = stdenv.lib.licenses.gpl3;
|
license = stdenv.lib.licenses.gpl3;
|
||||||
maintainers = [ stdenv.lib.maintainers.eperuffo ];
|
maintainers = [ stdenv.lib.maintainers.eperuffo ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
fetchgit, fetchhg, fetchbzr, fetchsvn }:
|
fetchgit, fetchhg, fetchbzr, fetchsvn }:
|
||||||
|
|
||||||
let
|
let
|
||||||
isx86_64 = stdenv.lib.any (n: n == stdenv.system) stdenv.lib.platforms.x86_64;
|
|
||||||
gui = true; # Might be implemented with nixpkgs config.
|
gui = true; # Might be implemented with nixpkgs config.
|
||||||
in
|
in
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
|
@ -22,11 +21,11 @@ buildGoPackage rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ trousers gtk3 gtkspell3 ]
|
buildInputs = [ trousers gtk3 gtkspell3 ]
|
||||||
++ stdenv.lib.optional isx86_64 dclxvi
|
++ stdenv.lib.optional stdenv.hostPlatform.isx86_64 dclxvi
|
||||||
++ stdenv.lib.optionals gui [ wrapGAppsHook ];
|
++ stdenv.lib.optionals gui [ wrapGAppsHook ];
|
||||||
buildFlags = stdenv.lib.optionalString (!gui) "-tags nogui";
|
buildFlags = stdenv.lib.optionalString (!gui) "-tags nogui";
|
||||||
excludedPackages = "\\(appengine\\|bn256cgo\\)";
|
excludedPackages = "\\(appengine\\|bn256cgo\\)";
|
||||||
postPatch = stdenv.lib.optionalString isx86_64 ''
|
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isx86_64 ''
|
||||||
grep -r 'bn256' | awk -F: '{print $1}' | xargs sed -i \
|
grep -r 'bn256' | awk -F: '{print $1}' | xargs sed -i \
|
||||||
-e "s,golang.org/x/crypto/bn256,github.com/agl/pond/bn256cgo,g" \
|
-e "s,golang.org/x/crypto/bn256,github.com/agl/pond/bn256cgo,g" \
|
||||||
-e "s,bn256\.,bn256cgo.,g"
|
-e "s,bn256\.,bn256cgo.,g"
|
||||||
|
|
|
@ -30,7 +30,6 @@ assert withGtk3 -> dconf != null;
|
||||||
assert withGtk3 -> gtk3 != null;
|
assert withGtk3 -> gtk3 != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
system-x86_64 = lib.elem stdenv.system lib.platforms.x86_64;
|
|
||||||
compareVersion = v: builtins.compareVersions version v;
|
compareVersion = v: builtins.compareVersions version v;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -258,7 +257,7 @@ stdenv.mkDerivation {
|
||||||
"-no-warnings-are-errors"
|
"-no-warnings-are-errors"
|
||||||
]
|
]
|
||||||
++ (
|
++ (
|
||||||
if (!system-x86_64)
|
if (!stdenv.hostPlatform.isx86_64)
|
||||||
then [ "-no-sse2" ]
|
then [ "-no-sse2" ]
|
||||||
else lib.optional (compareVersion "5.9.0" >= 0) [ "-sse2" ]
|
else lib.optional (compareVersion "5.9.0" >= 0) [ "-sse2" ]
|
||||||
)
|
)
|
||||||
|
|
|
@ -15,7 +15,7 @@ let
|
||||||
mkWith = mkFlag "with-" "without-";
|
mkWith = mkFlag "with-" "without-";
|
||||||
mkOther = mkFlag "" "" true;
|
mkOther = mkFlag "" "" true;
|
||||||
|
|
||||||
shouldUsePkg = pkg: if pkg != null && any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
|
shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
|
||||||
|
|
||||||
optLz4 = shouldUsePkg lz4;
|
optLz4 = shouldUsePkg lz4;
|
||||||
optSnappy = shouldUsePkg snappy;
|
optSnappy = shouldUsePkg snappy;
|
||||||
|
|
|
@ -70,9 +70,9 @@ stdenv.mkDerivation rec {
|
||||||
license = stdenv.lib.licenses.mit;
|
license = stdenv.lib.licenses.mit;
|
||||||
maintainers = [ stdenv.lib.maintainers.lukego ];
|
maintainers = [ stdenv.lib.maintainers.lukego ];
|
||||||
# Pharo VM sources are packaged separately for darwin (OS X)
|
# Pharo VM sources are packaged separately for darwin (OS X)
|
||||||
platforms = with stdenv.lib;
|
platforms = stdenv.lib.filter
|
||||||
intersectLists
|
(system: with stdenv.lib.systems.elaborate { inherit system; };
|
||||||
platforms.mesaPlatforms
|
isUnix && !isDarwin)
|
||||||
(subtractLists platforms.darwin platforms.unix);
|
stdenv.lib.platforms.mesaPlatforms;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "pharo";
|
name = "pharo";
|
||||||
src = ./.;
|
src = ./pharo-vm.sh;
|
||||||
inherit cog32 spur32 spur64 file;
|
inherit cog32 spur32 spur64 file;
|
||||||
magic = ./magic;
|
magic = ./magic;
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
|
@ -17,6 +17,10 @@ stdenv.mkDerivation rec {
|
||||||
categories = "Development;";
|
categories = "Development;";
|
||||||
mimeType = "application/x-pharo-image";
|
mimeType = "application/x-pharo-image";
|
||||||
};
|
};
|
||||||
|
unpackPhase = ''
|
||||||
|
cp $src ./pharo-vm.sh
|
||||||
|
sourceRoot=$PWD
|
||||||
|
'';
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
substituteAllInPlace ./pharo-vm.sh
|
substituteAllInPlace ./pharo-vm.sh
|
||||||
'';
|
'';
|
||||||
|
@ -49,10 +53,10 @@ stdenv.mkDerivation rec {
|
||||||
license = stdenv.lib.licenses.mit;
|
license = stdenv.lib.licenses.mit;
|
||||||
maintainers = [ stdenv.lib.maintainers.lukego ];
|
maintainers = [ stdenv.lib.maintainers.lukego ];
|
||||||
# Pharo VM sources are packaged separately for darwin (OS X)
|
# Pharo VM sources are packaged separately for darwin (OS X)
|
||||||
platforms = with stdenv.lib;
|
platforms = stdenv.lib.filter
|
||||||
intersectLists
|
(system: with stdenv.lib.systems.elaborate { inherit system; };
|
||||||
platforms.mesaPlatforms
|
isUnix && !isDarwin)
|
||||||
(subtractLists platforms.darwin platforms.unix);
|
stdenv.lib.platforms.mesaPlatforms;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
platform =
|
platform =
|
||||||
if lib.elem stdenv.system lib.platforms.unix then "unix"
|
if stdenv.hostPlatform.isUnix then "unix"
|
||||||
else throw "Unknown platform for NetHack: ${stdenv.system}";
|
else throw "Unknown platform for NetHack: ${stdenv.system}";
|
||||||
unixHint =
|
unixHint =
|
||||||
if stdenv.isLinux then "linux"
|
/**/ if stdenv.hostPlatform.isLinux then "linux"
|
||||||
else if stdenv.isDarwin then "macosx10.10"
|
else if stdenv.hostPlatform.isDarwin then "macosx10.10"
|
||||||
# We probably want something different for Darwin
|
# We probably want something different for Darwin
|
||||||
else "unix";
|
else "unix";
|
||||||
userDir = "~/.config/nethack";
|
userDir = "~/.config/nethack";
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
let
|
let
|
||||||
inherit (python2Packages) python dbus-python;
|
inherit (python2Packages) python dbus-python;
|
||||||
shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
|
shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
|
||||||
|
|
||||||
libOnly = prefix == "lib";
|
libOnly = prefix == "lib";
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
|
shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
|
||||||
|
|
||||||
optAlsaLib = shouldUsePkg alsaLib;
|
optAlsaLib = shouldUsePkg alsaLib;
|
||||||
optDb = shouldUsePkg db;
|
optDb = shouldUsePkg db;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
|
shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
|
||||||
|
|
||||||
libOnly = prefix == "lib";
|
libOnly = prefix == "lib";
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ stdenv.mkDerivation {
|
||||||
"--with-mail_ssl_module"
|
"--with-mail_ssl_module"
|
||||||
]
|
]
|
||||||
++ optional (gd != null) "--with-http_image_filter_module"
|
++ optional (gd != null) "--with-http_image_filter_module"
|
||||||
++ optional (elem stdenv.system (with platforms; linux ++ freebsd)) "--with-file-aio"
|
++ optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio"
|
||||||
++ map (mod: "--add-module=${mod.src}") modules;
|
++ map (mod: "--add-module=${mod.src}") modules;
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations";
|
NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations";
|
||||||
|
|
|
@ -14,7 +14,7 @@ let
|
||||||
mkWith = mkFlag "with-" "without-";
|
mkWith = mkFlag "with-" "without-";
|
||||||
mkOther = mkFlag "" "" true;
|
mkOther = mkFlag "" "" true;
|
||||||
|
|
||||||
shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
|
shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
|
||||||
|
|
||||||
optPam = shouldUsePkg pam;
|
optPam = shouldUsePkg pam;
|
||||||
optLibidn = shouldUsePkg libidn;
|
optLibidn = shouldUsePkg libidn;
|
||||||
|
|
|
@ -33,8 +33,7 @@ stdenv.mkDerivation rec {
|
||||||
"--docdir=share/doc"
|
"--docdir=share/doc"
|
||||||
"--with-nls=yes"
|
"--with-nls=yes"
|
||||||
"--with-embedded-src-path=no"
|
"--with-embedded-src-path=no"
|
||||||
] ++ stdenv.lib.optional (builtins.elem stdenv.system
|
] ++ stdenv.lib.optional (stdenv.hostPlatform.isx86_64) "--with-sse2=yes";
|
||||||
stdenv.lib.platforms.x86_64) "--with-sse2=yes";
|
|
||||||
|
|
||||||
# fatal error: inlined-icons.h: No such file or directory
|
# fatal error: inlined-icons.h: No such file or directory
|
||||||
enableParallelBuilding = false;
|
enableParallelBuilding = false;
|
||||||
|
|
|
@ -37,8 +37,7 @@ with stdenv.lib;
|
||||||
let
|
let
|
||||||
|
|
||||||
shouldUsePkg = pkg_: let pkg = (builtins.tryEval pkg_).value;
|
shouldUsePkg = pkg_: let pkg = (builtins.tryEval pkg_).value;
|
||||||
in if lib.any (x: x == system) (pkg.meta.platforms or [])
|
in if pkg.meta.available or false then pkg else null;
|
||||||
then pkg else null;
|
|
||||||
|
|
||||||
optYasm = shouldUsePkg yasm;
|
optYasm = shouldUsePkg yasm;
|
||||||
optFcgi = shouldUsePkg fcgi;
|
optFcgi = shouldUsePkg fcgi;
|
||||||
|
|
Loading…
Reference in a new issue