treewide: remove platform assertions

linux: readd assertion
This commit is contained in:
Matthew Bauer 2018-05-03 00:58:11 -05:00
parent 3216cf6cdf
commit 143978a477
65 changed files with 43 additions and 158 deletions

View file

@ -2,8 +2,6 @@
, glib, pango, cairo, atk, gdk_pixbuf, gtk2, cups, nspr, nss, libpng, GConf , glib, pango, cairo, atk, gdk_pixbuf, gtk2, cups, nspr, nss, libpng, GConf
, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_0_10, curl, zlib, gnome2 }: , libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_0_10, curl, zlib, gnome2 }:
assert stdenv.system == "x86_64-linux";
let let
# Please update the stable branch! # Please update the stable branch!
# Latest version number can be found at: # Latest version number can be found at:

View file

@ -3,8 +3,6 @@
, androidsdk, jdk, cmake, libxml2, zlib, python3, ncurses , androidsdk, jdk, cmake, libxml2, zlib, python3, ncurses
}: }:
assert stdenv.isLinux;
with stdenv.lib; with stdenv.lib;
let let

View file

@ -2,11 +2,10 @@
let let
libPath = stdenv.lib.makeLibraryPath [glib xorg.libX11 gtk2 cairo]; libPath = stdenv.lib.makeLibraryPath [glib xorg.libX11 gtk2 cairo];
in in
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "sublimetext-2.0.2"; name = "sublimetext-2.0.2";
src = src =
if stdenv.system == "i686-linux" then if stdenv.system == "i686-linux" then
fetchurl { fetchurl {
name = "sublimetext-2.0.2.tar.bz2"; name = "sublimetext-2.0.2.tar.bz2";
@ -55,5 +54,6 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Sophisticated text editor for code, markup and prose"; description = "Sophisticated text editor for code, markup and prose";
license = stdenv.lib.licenses.unfree; license = stdenv.lib.licenses.unfree;
platforms = [ "x86_64-linux" "i686-linux" ];
}; };
} }

View file

@ -4,7 +4,6 @@
pkexecPath ? "/run/wrappers/bin/pkexec", libredirect, pkexecPath ? "/run/wrappers/bin/pkexec", libredirect,
gksuSupport ? false, gksu, unzip, zip, bash}: gksuSupport ? false, gksu, unzip, zip, bash}:
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
assert gksuSupport -> gksu != null; assert gksuSupport -> gksu != null;
let let
@ -114,6 +113,6 @@ in stdenv.mkDerivation (rec {
homepage = https://www.sublimetext.com/; homepage = https://www.sublimetext.com/;
maintainers = with maintainers; [ wmertens demin-dmitriy zimbatm ]; maintainers = with maintainers; [ wmertens demin-dmitriy zimbatm ];
license = licenses.unfree; license = licenses.unfree;
platforms = platforms.linux; platforms = [ "x86_64-linux" "i686-linux" ];
}; };
}) })

View file

@ -4,8 +4,6 @@
libX11, libXcursor, libXrandr, libxcb, libXi, libSM, libICE, libX11, libXcursor, libXrandr, libxcb, libXi, libSM, libICE,
libXrender, libXcomposite }: libXrender, libXcomposite }:
assert stdenv.system == "x86_64-linux";
let version = "2017-SP2"; in let version = "2017-SP2"; in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "draftsight-${version}"; name = "draftsight-${version}";
@ -71,6 +69,6 @@ stdenv.mkDerivation {
homepage = https://www.3ds.com/products-services/draftsight-cad-software/; homepage = https://www.3ds.com/products-services/draftsight-cad-software/;
license = stdenv.lib.licenses.unfree; license = stdenv.lib.licenses.unfree;
maintainers = with maintainers; [ hodapp ]; maintainers = with maintainers; [ hodapp ];
platforms = platforms.linux; platforms = [ "x86_64-linux" ];
}; };
} }

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, patchelf, makeWrapper, xorg, gcc, gcc-unwrapped }: { stdenv, fetchurl, patchelf, makeWrapper, xorg, gcc, gcc-unwrapped }:
assert stdenv.isLinux;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "IPMIView-${version}"; name = "IPMIView-${version}";
version = "2.13.0"; version = "2.13.0";

View file

@ -1,12 +1,10 @@
{ fetchurl, stdenv, dpkg, makeWrapper, fontconfig, freetype, openssl, xorg, xkeyboard_config }: { fetchurl, stdenv, dpkg, makeWrapper, fontconfig, freetype, openssl, xorg, xkeyboard_config }:
assert stdenv.system == "x86_64-linux";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "8.1"; version = "8.1";
name = "minergate-${version}"; name = "minergate-${version}";
src = fetchurl { src = fetchurl {
url = "https://minergate.com/download/ubuntu"; url = "https://minergate.com/download/ubuntu";
sha256 = "1dbbbb8e0735cde239fca9e82c096dcc882f6cecda20bba7c14720a614c16e13"; sha256 = "1dbbbb8e0735cde239fca9e82c096dcc882f6cecda20bba7c14720a614c16e13";
}; };
@ -15,12 +13,12 @@ stdenv.mkDerivation rec {
phases = [ "installPhase" ]; phases = [ "installPhase" ];
installPhase = '' installPhase = ''
dpkg-deb -x $src $out dpkg-deb -x $src $out
pgm=$out/opt/minergate/minergate pgm=$out/opt/minergate/minergate
interpreter=${stdenv.glibc}/lib/ld-linux-x86-64.so.2 interpreter=${stdenv.glibc}/lib/ld-linux-x86-64.so.2
patchelf --set-interpreter "$interpreter" $pgm patchelf --set-interpreter "$interpreter" $pgm
wrapProgram $pgm --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ fontconfig freetype openssl stdenv.cc.cc xorg.libX11 xorg.libxcb ]} --prefix "QT_XKB_CONFIG_ROOT" ":" "${xkeyboard_config}/share/X11/xkb" wrapProgram $pgm --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ fontconfig freetype openssl stdenv.cc.cc xorg.libX11 xorg.libxcb ]} --prefix "QT_XKB_CONFIG_ROOT" ":" "${xkeyboard_config}/share/X11/xkb"
rm $out/usr/bin/minergate rm $out/usr/bin/minergate
@ -35,5 +33,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ bfortz ]; maintainers = with maintainers; [ bfortz ];
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
}; };
} }

View file

@ -21,8 +21,6 @@
, curl , curl
}: }:
assert stdenv.isLinux;
let let
version = "4.2.12"; version = "4.2.12";

View file

@ -48,8 +48,6 @@
, gnupg , gnupg
}: }:
assert stdenv.isLinux;
let let
inherit (generated) version sources; inherit (generated) version sources;

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, dpkg, zlib }: { stdenv, fetchurl, dpkg, zlib }:
assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";
stdenv.mkDerivation { stdenv.mkDerivation {
name = "TREZOR-bridge-1.0.5"; name = "TREZOR-bridge-1.0.5";
@ -42,6 +40,7 @@ stdenv.mkDerivation {
# Download URL, .deb content & hash (yikes) changed, not version. # Download URL, .deb content & hash (yikes) changed, not version.
# New archive doesn't contain any Mozilla plugin at all. # New archive doesn't contain any Mozilla plugin at all.
broken = true; broken = true;
}; platforms = platforms.linux;
};
} }

View file

@ -1,8 +1,6 @@
{ stdenv, fetchurl, cmake, openssl, libedit, flex, bison, qt4, makeWrapper { stdenv, fetchurl, cmake, openssl, libedit, flex, bison, qt4, makeWrapper
, gcc, nettools, iproute, linuxHeaders }: , gcc, nettools, iproute, linuxHeaders }:
assert stdenv.isLinux;
# NOTE: use $out/etc/iked.conf as sample configuration and also set: dhcp_file "/etc/iked.dhcp"; # NOTE: use $out/etc/iked.conf as sample configuration and also set: dhcp_file "/etc/iked.dhcp";
# launch with "iked -f /etc/iked.conf" # launch with "iked -f /etc/iked.conf"

View file

@ -3,8 +3,6 @@
, alsaLib, dbus_libs, gtk2, libpulseaudio, openssl, xorg , alsaLib, dbus_libs, gtk2, libpulseaudio, openssl, xorg
}: }:
assert stdenv.isLinux;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "jitsi-${version}"; name = "jitsi-${version}";
version = "2.10.5550"; version = "2.10.5550";

View file

@ -3,8 +3,6 @@
libpulseaudio, libxml2, libxslt, libGLU_combined, nspr, nss, openssl, systemd, wayland, xorg, zlib, ... libpulseaudio, libxml2, libxslt, libGLU_combined, nspr, nss, openssl, systemd, wayland, xorg, zlib, ...
}: }:
assert stdenv.system == "x86_64-linux";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "viber-${version}"; name = "viber-${version}";
version = "7.0.0.1035"; version = "7.0.0.1035";
@ -99,7 +97,7 @@ stdenv.mkDerivation rec {
homepage = http://www.viber.com; homepage = http://www.viber.com;
description = "An instant messaging and Voice over IP (VoIP) app"; description = "An instant messaging and Voice over IP (VoIP) app";
license = stdenv.lib.licenses.unfree; license = stdenv.lib.licenses.unfree;
platforms = stdenv.lib.platforms.linux; platforms = [ "x86_64-linux" ];
maintainers = with stdenv.lib.maintainers; [ jagajaga ]; maintainers = with stdenv.lib.maintainers; [ jagajaga ];
}; };

View file

@ -24,8 +24,6 @@ let
buildCore = monolithic || daemon; buildCore = monolithic || daemon;
in in
assert stdenv.isLinux;
assert monolithic -> !client && !daemon; assert monolithic -> !client && !daemon;
assert client || daemon -> !monolithic; assert client || daemon -> !monolithic;
assert !buildClient -> !withKDE; # KDE is used by the client only assert !buildClient -> !withKDE; # KDE is used by the client only

View file

@ -43,8 +43,6 @@
, gnupg , gnupg
}: }:
assert stdenv.isLinux;
# imports `version` and `sources` # imports `version` and `sources`
with (import ./release_sources.nix); with (import ./release_sources.nix);

View file

@ -34,8 +34,6 @@
, writeScript , writeScript
}: }:
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
let let
arch32 = "i686-linux"; arch32 = "i686-linux";
arch64 = "x86_64-linux"; arch64 = "x86_64-linux";
@ -140,7 +138,7 @@ stdenv.mkDerivation {
homepage = http://www.mendeley.com; homepage = http://www.mendeley.com;
description = "A reference manager and academic social network"; description = "A reference manager and academic social network";
license = licenses.unfree; license = licenses.unfree;
platforms = platforms.linux; platforms = [ "x86_64-linux" "i686-linux" ];
maintainers = with maintainers; [ dtzWill ]; maintainers = with maintainers; [ dtzWill ];
}; };

View file

@ -1,7 +1,6 @@
{ stdenv, fetchurl, gtk2, gdk_pixbuf, atk, pango, glib, cairo, freetype { stdenv, fetchurl, gtk2, gdk_pixbuf, atk, pango, glib, cairo, freetype
, fontconfig, libxml2, gnome2 }: , fontconfig, libxml2, gnome2 }:
assert stdenv.isLinux;
let let
libPath = stdenv.lib.makeLibraryPath libPath = stdenv.lib.makeLibraryPath

View file

@ -82,7 +82,7 @@ rec {
git-radar = callPackage ./git-radar { }; git-radar = callPackage ./git-radar { };
git-recent = callPackage ./git-recent { git-recent = callPackage ./git-recent {
utillinux = if stdenv.isLinux then utillinuxMinimal else null; utillinux = if stdenv.isLinux then utillinuxMinimal else utillinux;
}; };
git-remote-hg = callPackage ./git-remote-hg { }; git-remote-hg = callPackage ./git-remote-hg { };

View file

@ -1,15 +1,9 @@
{stdenv, git, less, fetchFromGitHub, makeWrapper {stdenv, git, less, fetchFromGitHub, makeWrapper
# utillinuxMinimal is included because we need the column command # utillinuxMinimal is included because we need the column command
, utillinux ? null , utillinux
}: }:
assert stdenv.isLinux -> utillinux != null; stdenv.mkDerivation rec {
let
binpath = stdenv.lib.makeBinPath
([ git less ]
++ stdenv.lib.optional (utillinux != null) utillinux);
in stdenv.mkDerivation rec {
name = "git-recent-${version}"; name = "git-recent-${version}";
version = "1.0.4"; version = "1.0.4";
@ -28,7 +22,7 @@ in stdenv.mkDerivation rec {
mkdir -p $out/bin mkdir -p $out/bin
cp git-recent $out/bin cp git-recent $out/bin
wrapProgram $out/bin/git-recent \ wrapProgram $out/bin/git-recent \
--prefix PATH : "${binpath}" --prefix PATH : "${stdenv.lib.makeBinPath [ git less utillinux ]}"
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, pkgconfig, libxml2, gtk, intltool, GConf, libsoup, libtasn1, nettle, gmp }: { stdenv, fetchurl, pkgconfig, libxml2, gtk, intltool, GConf, libsoup, libtasn1, nettle, gmp }:
assert stdenv.isLinux;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libgweather-2.30.3"; name = "libgweather-2.30.3";
src = fetchurl { src = fetchurl {

View file

@ -25,7 +25,6 @@
, setJavaClassPath , setJavaClassPath
}: }:
assert stdenv.system == "x86_64-linux";
assert swingSupport -> xorg != null; assert swingSupport -> xorg != null;
let let

View file

@ -9,7 +9,6 @@
with stdenv.lib; with stdenv.lib;
assert stdenv.isFreeBSD || stdenv.isDarwin || stdenv.cc.isGNU || hostPlatform.isCygwin;
assert stdenv.isLinux -> utillinuxMinimal != null; assert stdenv.isLinux -> utillinuxMinimal != null;
# TODO: # TODO:

View file

@ -3,8 +3,6 @@
, platformTools , platformTools
}: }:
assert stdenv.isLinux;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "android-ndk-r10e"; name = "android-ndk-r10e";

View file

@ -3,8 +3,6 @@
, platformTools , platformTools
}: }:
assert stdenv.isLinux;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "android-ndk-r8e"; name = "android-ndk-r8e";

View file

@ -1,7 +1,5 @@
{ stdenv, requireFile, p7zip, jre, libusb1, platformTools, gtk2, glib, libXtst }: { stdenv, requireFile, p7zip, jre, libusb1, platformTools, gtk2, glib, libXtst }:
assert stdenv.system == "i686-linux";
# TODO: # TODO:
# #
# The FlashTool and FlashToolConsole scripts are messy and should probably we # The FlashTool and FlashToolConsole scripts are messy and should probably we
@ -57,7 +55,7 @@ stdenv.mkDerivation rec {
homepage = http://www.flashtool.net/; homepage = http://www.flashtool.net/;
description = "S1 flashing software for Sony phones from X10 to Xperia Z Ultra"; description = "S1 flashing software for Sony phones from X10 to Xperia Z Ultra";
license = stdenv.lib.licenses.unfreeRedistributableFirmware; license = stdenv.lib.licenses.unfreeRedistributableFirmware;
platforms = stdenv.lib.platforms.linux; platforms = [ "i686-linux" ];
hydraPlatforms = stdenv.lib.platforms.none; hydraPlatforms = stdenv.lib.platforms.none;
broken = true; broken = true;
}; };

View file

@ -1,5 +1,4 @@
{ stdenv, makeWrapper, requireFile, patchelf, gcc, unzip }: { stdenv, makeWrapper, requireFile, patchelf, gcc, unzip }:
assert stdenv.system == "x86_64-linux";
with stdenv.lib; with stdenv.lib;
# v2.1: last version with NHM/WSM arch support # v2.1: last version with NHM/WSM arch support

View file

@ -1,5 +1,4 @@
{ stdenv, requireFile, patchelf, unzip }: { stdenv, requireFile, patchelf, unzip }:
assert stdenv.system == "x86_64-linux";
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation { stdenv.mkDerivation {

View file

@ -21,8 +21,6 @@ let
in in
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "saleae-logic"; pname = "saleae-logic";
version = "1.2.10"; version = "1.2.10";
@ -93,7 +91,7 @@ stdenv.mkDerivation rec {
description = "Software for Saleae logic analyzers"; description = "Software for Saleae logic analyzers";
homepage = http://www.saleae.com/; homepage = http://www.saleae.com/;
license = licenses.unfree; license = licenses.unfree;
platforms = platforms.linux; platforms = [ "x86_64-linux" "i686-linux" ];
maintainers = [ maintainers.bjornfor ]; maintainers = [ maintainers.bjornfor ];
}; };
} }

View file

@ -3,7 +3,6 @@
let let
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
in in
assert lib.elem stdenv.system platforms;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "phantomjs-1.9.8"; name = "phantomjs-1.9.8";

View file

@ -1,7 +1,6 @@
{ stdenv, fetchurl, patchelf, zlib, libmad, libpng12, libcaca, libGLU_combined, alsaLib, libpulseaudio { stdenv, fetchurl, patchelf, zlib, libmad, libpng12, libcaca, libGLU_combined, alsaLib, libpulseaudio
, xorg }: , xorg }:
assert stdenv.system == "x86_64-linux";
let let
inherit (xorg) libXext libX11; inherit (xorg) libXext libX11;
@ -58,5 +57,3 @@ stdenv.mkDerivation rec {
platforms = ["x86_64-linux"]; platforms = ["x86_64-linux"];
}; };
} }

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, alsaLib, qt48, SDL, fontconfig, freetype, SDL_ttf, xorg }: { stdenv, fetchurl, alsaLib, qt48, SDL, fontconfig, freetype, SDL_ttf, xorg }:
assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.151.u0-1"; version = "0.151.u0-1";
name = "sdlmame-${version}"; name = "sdlmame-${version}";
@ -39,6 +37,6 @@ stdenv.mkDerivation rec {
description = "A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support"; description = "A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support";
license = "MAME"; license = "MAME";
maintainers = with maintainers; [ lovek323 ]; maintainers = with maintainers; [ lovek323 ];
platforms = platforms.linux; platforms = [ "x86_64-linux" "i686-linux" ];
}; };
} }

View file

@ -1,5 +1,4 @@
{ stdenv, lib, file, fetchurl, unzip }: { stdenv, lib, file, fetchurl, unzip }:
assert stdenv.system == "x86_64-linux";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "terraria-server-${version}"; name = "terraria-server-${version}";
@ -31,7 +30,7 @@ stdenv.mkDerivation rec {
meta = with lib; { meta = with lib; {
homepage = http://terraria.org; homepage = http://terraria.org;
description = "Dedicated server for Terraria, a 2D action-adventure sandbox"; description = "Dedicated server for Terraria, a 2D action-adventure sandbox";
platforms = platforms.linux; platforms = ["x86_64-linux"];
license = licenses.unfree; license = licenses.unfree;
}; };
} }

View file

@ -1,7 +1,6 @@
{ stdenv, fetchurl, patchelf, glibc, libX11, libGLU_combined }: { stdenv, fetchurl, patchelf, glibc, libX11, libGLU_combined }:
with stdenv.lib; with stdenv.lib;
assert stdenv.isi686;
stdenv.mkDerivation { stdenv.mkDerivation {
name = "tibia-10.90"; name = "tibia-10.90";

View file

@ -1,8 +1,5 @@
{ stdenv, fetchurl, unzip, patchelf, xorg, openal }: { stdenv, fetchurl, unzip, patchelf, xorg, openal }:
assert stdenv.isLinux;
assert stdenv.isx86_64;
let let
buildDemo = { name, src }: buildDemo = { name, src }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -47,7 +44,7 @@ let
meta = { meta = {
description = "Unreal Engine 4 Linux demos"; description = "Unreal Engine 4 Linux demos";
homepage = https://wiki.unrealengine.com/Linux_Demos; homepage = https://wiki.unrealengine.com/Linux_Demos;
platforms = stdenv.lib.platforms.linux; platforms = [ "x86_64-linux" ];
license = stdenv.lib.licenses.unfree; license = stdenv.lib.licenses.unfree;
}; };
}; };
@ -189,4 +186,3 @@ in {
}; };
}; };
} }

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, rpm, cpio, zlib }: { stdenv, fetchurl, rpm, cpio, zlib }:
assert stdenv.system == "x86_64-linux";
/* usage: (sorry, its still impure but works!) /* usage: (sorry, its still impure but works!)
impure directory: impure directory:
@ -23,7 +21,7 @@ sed -n 's/^ServerBin //p' $(sed -n 's/respawn.*-c \(.*''\) -F.*''/\1/p' /etc/eve
then. I've tried that. then. I've tried that.
TODO tidy this all up. Find source instead of binary. Fix paths ... Find out how to check ink levels etc TODO tidy this all up. Find source instead of binary. Fix paths ... Find out how to check ink levels etc
*/ */
stdenv.mkDerivation { stdenv.mkDerivation {
@ -56,13 +54,13 @@ stdenv.mkDerivation {
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $libPath $p --set-rpath $libPath $p
done done
mkdir $out/lib mkdir $out/lib
ln -s $out/cups/lib $out/lib/cups ln -s $out/cups/lib $out/lib/cups
''; '';
meta = { meta = {
description = "Some additional CUPS drivers including Canon drivers"; description = "Some additional CUPS drivers including Canon drivers";
platforms = stdenv.lib.platforms.linux; platforms = [ "x86_64-linux" ];
}; };
} }

View file

@ -2,8 +2,6 @@
, makeWrapper, perl, pkgconfig, portaudio, SDL2, soundtouch, stdenv , makeWrapper, perl, pkgconfig, portaudio, SDL2, soundtouch, stdenv
, wxGTK30, zlib }: , wxGTK30, zlib }:
assert stdenv.isi686;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "pcsx2-${version}"; name = "pcsx2-${version}";
version = "1.4.0"; version = "1.4.0";

View file

@ -6,7 +6,6 @@
buildScript ? null, configureFlags ? "" buildScript ? null, configureFlags ? ""
}: }:
assert stdenv.isLinux;
assert stdenv.cc.cc.isGNU or false; assert stdenv.cc.cc.isGNU or false;
with import ./util.nix { inherit lib; }; with import ./util.nix { inherit lib; };
@ -83,7 +82,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
# Add capability to ignore known failing tests # Add capability to ignore known failing tests
# and enable doCheck # and enable doCheck
doCheck = false; doCheck = false;
postInstall = let postInstall = let
links = prefix: pkg: "ln -s ${pkg} $out/${prefix}/${pkg.name}"; links = prefix: pkg: "ln -s ${pkg} $out/${prefix}/${pkg.name}";
in '' in ''
@ -100,7 +99,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
fi fi
done done
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;
# https://bugs.winehq.org/show_bug.cgi?id=43530 # https://bugs.winehq.org/show_bug.cgi?id=43530

View file

@ -1,7 +1,5 @@
{stdenv, fetchurl}: {stdenv, fetchurl}:
assert stdenv.system == "i686-linux";
stdenv.mkDerivation { stdenv.mkDerivation {
name = "folding-at-home-6.02"; name = "folding-at-home-6.02";
@ -22,7 +20,7 @@ stdenv.mkDerivation {
# be considered a gcroot. # be considered a gcroot.
installPhase = '' installPhase = ''
BINFILES="fah6 mpiexec"; BINFILES="fah6 mpiexec";
for a in $BINFILES; do for a in $BINFILES; do
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $a patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $a
done done
mkdir -p $out/bin mkdir -p $out/bin
@ -33,5 +31,6 @@ stdenv.mkDerivation {
homepage = http://folding.stanford.edu/; homepage = http://folding.stanford.edu/;
description = "Folding@home distributed computing client"; description = "Folding@home distributed computing client";
license = stdenv.lib.licenses.unfree; license = stdenv.lib.licenses.unfree;
platforms = [ "i686-linux" ];
}; };
} }

View file

@ -1,7 +1,5 @@
{ stdenv, writeScript }: { stdenv, writeScript }:
assert stdenv.isDarwin;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "darwin-native-x11-and-opengl"; name = "darwin-native-x11-and-opengl";

View file

@ -2,7 +2,6 @@
# BLCR version 0.8.6 should works with linux kernel up to version 3.17.x # BLCR version 0.8.6 should works with linux kernel up to version 3.17.x
assert stdenv.isLinux;
assert builtins.compareVersions "3.18" kernel.version == 1; assert builtins.compareVersions "3.18" kernel.version == 1;
stdenv.mkDerivation { stdenv.mkDerivation {

View file

@ -2,8 +2,6 @@
pythonPackages, readline, udev, libical, pythonPackages, readline, udev, libical,
systemd, enableWiimote ? false, enableMidi ? false }: systemd, enableWiimote ? false, enableMidi ? false }:
assert stdenv.isLinux;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "bluez-5.49"; name = "bluez-5.49";

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, libtool, gettext }: { stdenv, fetchurl, libtool, gettext }:
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "cpufrequtils-008"; name = "cpufrequtils-008";

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, flex, systemd, perl }: { stdenv, fetchurl, flex, systemd, perl }:
assert stdenv.isLinux;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "drbd-8.4.4"; name = "drbd-8.4.4";

View file

@ -1,5 +1,4 @@
{ stdenv, buildPackages, fetchurl, attr, perl, pam ? null }: { stdenv, buildPackages, fetchurl, attr, perl, pam }:
assert pam != null -> stdenv.isLinux;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libcap-${version}"; name = "libcap-${version}";
@ -10,8 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"; sha256 = "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39";
}; };
outputs = [ "out" "dev" "lib" "man" "doc" ] outputs = [ "out" "dev" "lib" "man" "doc" "pam" ];
++ stdenv.lib.optional (pam != null) "pam";
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl ]; nativeBuildInputs = [ perl ];
@ -22,7 +20,7 @@ stdenv.mkDerivation rec {
makeFlags = [ makeFlags = [
"lib=lib" "lib=lib"
(stdenv.lib.optional (pam != null) "PAM_CAP=yes") "PAM_CAP=yes"
"BUILD_CC=$(CC_FOR_BUILD)" "BUILD_CC=$(CC_FOR_BUILD)"
"CC:=$(CC)" "CC:=$(CC)"
]; ];

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl }: { stdenv, fetchurl }:
assert stdenv.isLinux;
stdenv.mkDerivation { stdenv.mkDerivation {
name = "lsscsi-0.28"; name = "lsscsi-0.28";

View file

@ -3,8 +3,6 @@
, buildPlatform, hostPlatform , buildPlatform, hostPlatform
}: }:
assert stdenv.isLinux;
let let
sendmail-script = writeScript "sendmail-script" '' sendmail-script = writeScript "sendmail-script" ''
#!/bin/sh #!/bin/sh

View file

@ -5,9 +5,6 @@ with stdenv.lib;
# The Magewell Pro Capture drivers are not supported for kernels older than 3.2 # The Magewell Pro Capture drivers are not supported for kernels older than 3.2
assert versionAtLeast kernel.version "3.2.0"; assert versionAtLeast kernel.version "3.2.0";
# this package currently only supports x86 and x86_64, as I have no ARM device to test on
assert (stdenv.system == "x86_64-linux") || (stdenv.system == "i686-linux");
let let
bits = bits =
if stdenv.is64bit then "64" if stdenv.is64bit then "64"

View file

@ -1,6 +1,5 @@
{ stdenv, fetchurl, kernel, which }: { stdenv, fetchurl, kernel, which }:
assert stdenv.isLinux;
# Don't bother with older versions, though some might even work: # Don't bother with older versions, though some might even work:
assert stdenv.lib.versionAtLeast kernel.version "4.10"; assert stdenv.lib.versionAtLeast kernel.version "4.10";

View file

@ -1,7 +1,5 @@
{stdenv, fetchurl, ncurses}: {stdenv, fetchurl, ncurses}:
assert stdenv.isLinux;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "psmisc-23.1"; name = "psmisc-23.1";

View file

@ -1,7 +1,5 @@
{ stdenv, systemd, cryptsetup }: { stdenv, systemd, cryptsetup }:
assert stdenv.isLinux;
stdenv.lib.overrideDerivation systemd (p: { stdenv.lib.overrideDerivation systemd (p: {
version = p.version; version = p.version;
name = "systemd-cryptsetup-generator"; name = "systemd-cryptsetup-generator";

View file

@ -13,8 +13,6 @@
, withSelinux ? false, libselinux , withSelinux ? false, libselinux
}: }:
assert stdenv.isLinux;
let let
pythonLxmlEnv = buildPackages.python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]); pythonLxmlEnv = buildPackages.python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]);

View file

@ -1,7 +1,6 @@
{stdenv, fetchzip, linuxHeaders, libiconvReal, cross ? null, gccCross ? null, {stdenv, fetchzip, linuxHeaders, libiconvReal, cross ? null, gccCross ? null,
extraConfig ? ""}: extraConfig ? ""}:
assert stdenv.isLinux;
assert cross != null -> gccCross != null; assert cross != null -> gccCross != null;
let let

View file

@ -3,8 +3,6 @@
, useSystemd ? true, systemd, gobjectIntrospection , useSystemd ? true, systemd, gobjectIntrospection
}: }:
assert stdenv.isLinux;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "upower-0.99.7"; name = "upower-0.99.7";

View file

@ -11,8 +11,6 @@
, libpciaccess , libpciaccess
}: }:
assert stdenv.isLinux;
stdenv.mkDerivation { stdenv.mkDerivation {
name = "xf86-input-multitouch-20110312"; name = "xf86-input-multitouch-20110312";

View file

@ -1,7 +1,5 @@
{ stdenv, makeWrapper, requireFile, patchelf, rpmextract, libaio }: { stdenv, makeWrapper, requireFile, patchelf, rpmextract, libaio }:
assert stdenv.system == "x86_64-linux";
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -79,5 +77,6 @@ stdenv.mkDerivation rec {
description = "Oracle Database Express Edition"; description = "Oracle Database Express Edition";
homepage = http://www.oracle.com/technetwork/products/express-edition/; homepage = http://www.oracle.com/technetwork/products/express-edition/;
license = licenses.unfree; license = licenses.unfree;
platforms = [ "x86_64-linux" ];
}; };
} }

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, lib, rpmextract }: { stdenv, fetchurl, lib, rpmextract }:
assert stdenv.isLinux;
with lib; with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, writeText, zlib, rpmextract, patchelf, which }: { stdenv, fetchurl, writeText, zlib, rpmextract, patchelf, which }:
assert stdenv.isLinux;
let let
p = if stdenv.is64bit then { p = if stdenv.is64bit then {
arch = "x86_64"; arch = "x86_64";
@ -13,7 +11,7 @@ let
gcclib = "${stdenv.cc.cc.lib}/lib"; gcclib = "${stdenv.cc.cc.lib}/lib";
sha256 = "09h71i3k9d24ki81jdwhnav63fqbc44glbx228s9g3cr4ap41jcx"; sha256 = "09h71i3k9d24ki81jdwhnav63fqbc44glbx228s9g3cr4ap41jcx";
}; };
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "yandex-disk-${version}"; name = "yandex-disk-${version}";
@ -64,4 +62,3 @@ stdenv.mkDerivation rec {
''; '';
}; };
} }

View file

@ -1,7 +1,5 @@
{ stdenv, rpmextract, ncurses5, patchelf, makeWrapper, requireFile, unzip }: { stdenv, rpmextract, ncurses5, patchelf, makeWrapper, requireFile, unzip }:
assert stdenv.system == "x86_64-linux";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "megacli-8.07.07"; name = "megacli-8.07.07";
@ -31,5 +29,6 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "CLI program for LSI MegaRAID cards, which also works with some Dell PERC RAID cards"; description = "CLI program for LSI MegaRAID cards, which also works with some Dell PERC RAID cards";
license = stdenv.lib.licenses.unfree; license = stdenv.lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
}; };
} }

View file

@ -1,7 +1,5 @@
{stdenv, fetchurl, libusb, makeWrapper}: {stdenv, fetchurl, libusb, makeWrapper}:
assert stdenv.isLinux;
stdenv.mkDerivation { stdenv.mkDerivation {
name = "pk2cmd-1.20"; name = "pk2cmd-1.20";
src = fetchurl { src = fetchurl {

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, fetchgit, go }: { stdenv, fetchurl, fetchgit, go }:
assert stdenv.isLinux && (stdenv.isi686 || stdenv.isx86_64 || stdenv.isAarch32);
let let
# Code with BSD license # Code with BSD license

View file

@ -2,8 +2,6 @@
with stdenv.lib; with stdenv.lib;
assert stdenv.isLinux;
let let
arch = arch =
if stdenv.system == "x86_64-linux" then "x64" if stdenv.system == "x86_64-linux" then "x64"

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, iptables, libuuid, pkgconfig }: { stdenv, fetchurl, iptables, libuuid, pkgconfig }:
assert stdenv.isLinux;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "miniupnpd-2.0.20180422"; name = "miniupnpd-2.0.20180422";

View file

@ -4,7 +4,7 @@ assert tlsSupport -> openssl != null;
stdenv.mkDerivation { stdenv.mkDerivation {
name = "ssmtp-2.64"; name = "ssmtp-2.64";
src = fetchurl { src = fetchurl {
url = mirror://debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2; url = mirror://debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2;
sha256 = "0dps8s87ag4g3jr6dk88hs9zl46h3790marc5c2qw7l71k4pvhr2"; sha256 = "0dps8s87ag4g3jr6dk88hs9zl46h3790marc5c2qw7l71k4pvhr2";
@ -28,7 +28,7 @@ stdenv.mkDerivation {
installFlags = "etcdir=$(out)/etc"; installFlags = "etcdir=$(out)/etc";
installTargets = [ "install" "install-sendmail" ]; installTargets = [ "install" "install-sendmail" ];
buildInputs = stdenv.lib.optional tlsSupport openssl; buildInputs = stdenv.lib.optional tlsSupport openssl;
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -3,15 +3,15 @@
, gtk2, pango, atk, cairo, gdk_pixbuf, jasper, xkeyboardconfig , gtk2, pango, atk, cairo, gdk_pixbuf, jasper, xkeyboardconfig
, makeWrapper , makeDesktopItem, python, pythonPackages, lib , makeWrapper , makeDesktopItem, python, pythonPackages, lib
, libredirect, lsof}: , libredirect, lsof}:
assert system == "i686-linux" || system == "x86_64-linux";
let let
all_data = (with builtins; fromJSON (readFile ./data.json)); all_data = builtins.fromJSON (builtins.readFile ./data.json);
system_map = { system_map = {
i686-linux = "i386"; i686-linux = "i386";
x86_64-linux = "amd64"; x86_64-linux = "amd64";
}; };
data = (with builtins; getAttr (getAttr system system_map) all_data); data = all_data.${system_map.${system} or (throw "Unsupported platform")};
baseUrl = http://repo.sinew.in; baseUrl = http://repo.sinew.in;
@ -54,7 +54,7 @@ let
description = "a well known password manager"; description = "a well known password manager";
homepage = https://www.enpass.io/; homepage = https://www.enpass.io/;
license = lib.licenses.unfree; license = lib.licenses.unfree;
platforms = lib.platforms.linux; platforms = [ "x86_64-linux" "i686-linux"];
}; };
buildInputs = [makeWrapper dpkg]; buildInputs = [makeWrapper dpkg];
@ -70,8 +70,8 @@ let
cp $out/bin/EnpassHelper/EnpassNMHost{,.untampered} cp $out/bin/EnpassHelper/EnpassNMHost{,.untampered}
sed \ sed \
-i s@/opt/Enpass/bin/runenpass.sh@$out/bin/Enpass@ \ -i s@/opt/Enpass/bin/runenpass.sh@$out/bin/Enpass@ \
$out/share/applications/enpass.desktop $out/share/applications/enpass.desktop
for i in $out/bin/{Enpass,EnpassHelper/{EnpassHelper,EnpassNMHost}}; do for i in $out/bin/{Enpass,EnpassHelper/{EnpassHelper,EnpassNMHost}}; do
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, fetchhg, go, sqlite}: { stdenv, fetchurl, fetchhg, go, sqlite}:
assert stdenv.isLinux && (stdenv.isi686 || stdenv.isx86_64 || stdenv.isAarch32);
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "storebrowse-20130318212204"; name = "storebrowse-20130318212204";