Merge branch 'master' into staging-next

This commit is contained in:
Robert Schütz 2018-08-31 17:32:48 +02:00
commit 93550cbddf
497 changed files with 2235 additions and 1360 deletions

View File

@ -1074,4 +1074,5 @@ Following rules are desired to be respected:
* Make sure libraries build for all Python interpreters.
* By default we enable tests. Make sure the tests are found and, in the case of libraries, are passing for all interpreters. If certain tests fail they can be disabled individually. Try to avoid disabling the tests altogether. In any case, when you disable tests, leave a comment explaining why.
* Commit names of Python libraries should reflect that they are Python libraries, so write for example `pythonPackages.numpy: 1.11 -> 1.12`.
* Attribute names in `python-packages.nix` should be normalized according to [PEP 0503](https://www.python.org/dev/peps/pep-0503/#normalized-names).
This means that characters should be converted to lowercase and `.` and `_` should be replaced by a single `-` (foo-bar-baz instead of Foo__Bar.baz )

View File

@ -93,8 +93,8 @@ Now, the file produced by the call to `carnix`, called `hello.nix`, looks like:
```
# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
{ lib, buildPlatform, buildRustCrate, fetchgit }:
let kernel = buildPlatform.parsed.kernel.name;
{ lib, stdenv, buildRustCrate, fetchgit }:
let kernel = stdenv.buildPlatform.parsed.kernel.name;
# ... (content skipped)
in
rec {
@ -122,8 +122,8 @@ following nix file:
```
# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
{ lib, buildPlatform, buildRustCrate, fetchgit }:
let kernel = buildPlatform.parsed.kernel.name;
{ lib, stdenv, buildRustCrate, fetchgit }:
let kernel = stdenv.buildPlatform.parsed.kernel.name;
# ... (content skipped)
in
rec {

View File

@ -78,7 +78,7 @@ Step 2: build kernel headers for the target architecture
---
{stdenv, fetchurl}:
assert stdenv.system == "i686-linux";
assert stdenv.buildPlatform.system == "i686-linux";
stdenv.mkDerivation {
name = "linux-headers-2.6.13.1-arm";

View File

@ -23,6 +23,11 @@
github = "a1russell";
name = "Adam Russell";
};
aanderse = {
email = "aaron@fosslib.net";
github = "aanderse";
name = "Aaron Andersen";
};
aaronschif = {
email = "aaronschif@gmail.com";
github = "aaronschif";

View File

@ -1,7 +1,7 @@
{ stdenv, perl, pixz, pathsFromGraph
, # The file name of the resulting tarball
fileName ? "nixos-system-${stdenv.system}"
fileName ? "nixos-system-${stdenv.hostPlatform.system}"
, # The files and directories to be placed in the tarball.
# This is a list of attribute sets {source, target} where `source'

View File

@ -14,12 +14,12 @@ in
qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0"
else if pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64 then "ttyAMA0"
else throw "Unknown QEMU serial device for system '${pkgs.stdenv.system}'";
else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'";
qemuBinary = qemuPkg: {
"x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
"armv7l-linux" = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host";
"aarch64-linux" = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host";
"x86_64-darwin" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64";
}.${pkgs.stdenv.system} or "${qemuPkg}/bin/qemu-kvm";
}.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm";
}

View File

@ -16,7 +16,7 @@ with lib;
];
# ISO naming.
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.iso";
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";
isoImage.volumeID = substring 0 11 "NIXOS_ISO";

View File

@ -16,7 +16,8 @@ in
];
assertions = lib.singleton {
assertion = pkgs.stdenv.system == "aarch64-linux";
assertion = pkgs.stdenv.hostPlatform.system == "aarch64-linux"
&& pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system;
message = "sd-image-aarch64.nix can be only built natively on Aarch64 / ARM64; " +
"it cannot be cross compiled";
};

View File

@ -16,7 +16,8 @@ in
];
assertions = lib.singleton {
assertion = pkgs.stdenv.system == "armv7l-linux";
assertion = pkgs.stdenv.hostPlatform.system == "armv7l-linux"
&& pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system;
message = "sd-image-armv7l-multiplatform.nix can be only built natively on ARMv7; " +
"it cannot be cross compiled";
};

View File

@ -16,7 +16,8 @@ in
];
assertions = lib.singleton {
assertion = pkgs.stdenv.system == "armv6l-linux";
assertion = pkgs.stdenv.hostPlatform.system == "armv6l-linux"
&& pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system;
message = "sd-image-raspberrypi.nix can be only built natively on ARMv6; " +
"it cannot be cross compiled";
};

View File

@ -22,7 +22,7 @@ in
{
options.sdImage = {
imageName = mkOption {
default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.img";
default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.img";
description = ''
Name of the generated image file.
'';
@ -102,7 +102,7 @@ in
mkdir -p $out/nix-support $out/sd-image
export img=$out/sd-image/${config.sdImage.imageName}
echo "${pkgs.stdenv.system}" > $out/nix-support/system
echo "${pkgs.stdenv.buildPlatform.system}" > $out/nix-support/system
echo "file sd-image $img" >> $out/nix-support/hydra-build-products
# Create the image file sized to fit /boot and /, plus 20M of slack

View File

@ -25,7 +25,7 @@ with lib;
# !!! Hack - attributes expected by other modules.
environment.systemPackages = [ pkgs.grub2_efi ]
++ (if pkgs.stdenv.system == "aarch64-linux"
++ (if pkgs.stdenv.hostPlatform.system == "aarch64-linux"
then []
else [ pkgs.grub2 pkgs.syslinux ]);

View File

@ -328,6 +328,7 @@
qemu-libvirtd = 301;
# kvm = 302; # unused
# render = 303; # unused
zeronet = 304;
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
@ -616,6 +617,7 @@
qemu-libvirtd = 301;
kvm = 302; # default udev rules from systemd requires these
render = 303; # default udev rules from systemd requires these
zeronet = 304;
# When adding a gid, make sure it doesn't match an existing
# uid. Users and groups with the same name should have equal

View File

@ -421,6 +421,7 @@
./services/monitoring/graphite.nix
./services/monitoring/hdaps.nix
./services/monitoring/heapster.nix
./services/monitoring/incron.nix
./services/monitoring/longview.nix
./services/monitoring/monit.nix
./services/monitoring/munin.nix
@ -619,6 +620,7 @@
./services/networking/xl2tpd.nix
./services/networking/xrdp.nix
./services/networking/zerobin.nix
./services/networking/zeronet.nix
./services/networking/zerotierone.nix
./services/networking/znc.nix
./services/printing/cupsd.nix

View File

@ -283,7 +283,7 @@ in
mkdir -p ${cfg.repositoryRoot}
# update all hooks' binary paths
HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 5 -type f -wholename "*git/hooks/*")
HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 6 -type f -wholename "*git/hooks/*")
if [ "$HOOKS" ]
then
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea.bin}/bin/gitea,g' $HOOKS

View File

@ -10,7 +10,7 @@ let
toYesNo = b: if b then "yes" else "no";
gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.system + "-" + ghc.name + "/" + gitit.pname + "-" + gitit.version;
gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.hostPlatform.system + "-" + ghc.name + "/" + gitit.pname + "-" + gitit.version;
gititWithPkgs = hsPkgs: extras: hsPkgs.ghcWithPackages (self: with self; [ gitit ] ++ (extras self));

View File

@ -0,0 +1,98 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.incron;
in
{
options = {
services.incron = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the incron daemon.
Note that commands run under incrontab only support common Nix profiles for the <envar>PATH</envar> provided variable.
'';
};
allow = mkOption {
type = types.nullOr (types.listOf types.str);
default = null;
description = ''
Users allowed to use incrontab.
If empty then no user will be allowed to have their own incrontab.
If <literal>null</literal> then will defer to <option>deny</option>.
If both <option>allow</option> and <option>deny</option> are null
then all users will be allowed to have their own incrontab.
'';
};
deny = mkOption {
type = types.nullOr (types.listOf types.str);
default = null;
description = "Users forbidden from using incrontab.";
};
systab = mkOption {
type = types.lines;
default = "";
description = "The system incrontab contents.";
example = ''
/var/mail IN_CLOSE_WRITE abc $@/$#
/tmp IN_ALL_EVENTS efg $@/$# $&
'';
};
extraPackages = mkOption {
type = types.listOf types.package;
default = [];
example = literalExample "[ pkgs.rsync ]";
description = "Extra packages available to the system incrontab.";
};
};
};
config = mkIf cfg.enable {
warnings = optional (cfg.allow != null && cfg.deny != null)
''If `services.incron.allow` is set then `services.incron.deny` will be ignored.'';
environment.systemPackages = [ pkgs.incron ];
security.wrappers.incrontab.source = "${pkgs.incron}/bin/incrontab";
# incron won't read symlinks
environment.etc."incron.d/system" = {
mode = "0444";
text = cfg.systab;
};
environment.etc."incron.allow" = mkIf (cfg.allow != null) {
text = concatStringsSep "\n" cfg.allow;
};
environment.etc."incron.deny" = mkIf (cfg.deny != null) {
text = concatStringsSep "\n" cfg.deny;
};
systemd.services.incron = {
description = "File System Events Scheduler";
wantedBy = [ "multi-user.target" ];
path = cfg.extraPackages;
serviceConfig.PIDFile = "/run/incrond.pid";
serviceConfig.ExecStartPre = "${pkgs.coreutils}/bin/mkdir -m 710 -p /var/spool/incron";
serviceConfig.ExecStart = "${pkgs.incron}/bin/incrond --foreground";
};
};
}

View File

@ -99,7 +99,7 @@ let
nopriv_user=vsftpd
secure_chroot_dir=/var/empty
syslog_enable=YES
${optionalString (pkgs.stdenv.system == "x86_64-linux") ''
${optionalString (pkgs.stdenv.hostPlatform.system == "x86_64-linux") ''
seccomp_sandbox=NO
''}
anon_umask=${cfg.anonymousUmask}

View File

@ -0,0 +1,102 @@
{ config, lib, pkgs, ... }:
let
cfg = config.services.zeronet;
zConfFile = pkgs.writeTextFile {
name = "zeronet.conf";
text = ''
[global]
data_dir = ${cfg.dataDir}
log_dir = ${cfg.logDir}
'' + lib.optionalString (cfg.port != null) ''
ui_port = ${toString cfg.port}
'' + cfg.extraConfig;
};
in with lib; {
options.services.zeronet = {
enable = mkEnableOption "zeronet";
dataDir = mkOption {
type = types.path;
default = "/var/lib/zeronet";
example = "/home/okina/zeronet";
description = "Path to the zeronet data directory.";
};
logDir = mkOption {
type = types.path;
default = "/var/log/zeronet";
example = "/home/okina/zeronet/log";
description = "Path to the zeronet log directory.";
};
port = mkOption {
type = types.nullOr types.int;
default = null;
example = 15441;
description = "Optional zeronet port.";
};
tor = mkOption {
type = types.bool;
default = false;
description = "Use TOR for all zeronet traffic.";
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration. Contents will be added verbatim to the
configuration file at the end.
'';
};
};
config = mkIf cfg.enable {
services.tor = mkIf cfg.tor {
enable = true;
controlPort = 9051;
extraConfig = "CookieAuthentication 1";
};
systemd.services.zeronet = {
description = "zeronet";
after = [ "network.target" (optionalString cfg.tor "tor.service") ];
wantedBy = [ "multi-user.target" ];
preStart = ''
# Ensure folder exists or create it and permissions are correct
mkdir -p ${escapeShellArg cfg.dataDir} ${escapeShellArg cfg.logDir}
chmod 750 ${escapeShellArg cfg.dataDir} ${escapeShellArg cfg.logDir}
chown zeronet:zeronet ${escapeShellArg cfg.dataDir} ${escapeShellArg cfg.logDir}
'';
serviceConfig = {
PermissionsStartOnly = true;
PrivateTmp = "yes";
User = "zeronet";
Group = "zeronet";
ExecStart = "${pkgs.zeronet}/bin/zeronet --config_file ${zConfFile}";
};
};
users = {
groups.zeronet.gid = config.ids.gids.zeronet;
users.zeronet = {
description = "zeronet service user";
home = cfg.dataDir;
createHome = true;
group = "zeronet";
extraGroups = mkIf cfg.tor [ "tor" ];
uid = config.ids.uids.zeronet;
};
};
};
meta.maintainers = with maintainers; [ chiiruno ];
}

View File

@ -188,11 +188,14 @@ in {
wants = [ "systemd-udevd.service" "local-fs.target" ];
# make sure an empty rule file and required directories exist
preStart = ''mkdir -p $(dirname "${cfg.ruleFile}") "${cfg.IPCAccessControlFiles}" && ([ -f "${cfg.ruleFile}" ] || touch ${cfg.ruleFile})'';
preStart = ''
mkdir -p $(dirname "${cfg.ruleFile}") $(dirname "${cfg.auditFilePath}") "${cfg.IPCAccessControlFiles}" \
&& ([ -f "${cfg.ruleFile}" ] || touch ${cfg.ruleFile})
'';
serviceConfig = {
Type = "simple";
ExecStart = ''${pkgs.usbguard}/bin/usbguard-daemon -P -d -k -c ${daemonConfFile}'';
ExecStart = ''${pkgs.usbguard}/bin/usbguard-daemon -P -k -c ${daemonConfFile}'';
Restart = "on-failure";
};
};

View File

@ -16,9 +16,11 @@ let
} // (optionalAttrs vhostConfig.enableACME {
sslCertificate = "${acmeDirectory}/${serverName}/fullchain.pem";
sslCertificateKey = "${acmeDirectory}/${serverName}/key.pem";
sslTrustedCertificate = "${acmeDirectory}/${serverName}/full.pem";
}) // (optionalAttrs (vhostConfig.useACMEHost != null) {
sslCertificate = "${acmeDirectory}/${vhostConfig.useACMEHost}/fullchain.pem";
sslCertificateKey = "${acmeDirectory}/${vhostConfig.useACMEHost}/key.pem";
sslTrustedCertificate = "${acmeDirectory}/${vhostConfig.useACMEHost}/full.pem";
})
) cfg.virtualHosts;
enableIPv6 = config.networking.enableIPv6;
@ -228,6 +230,9 @@ let
ssl_certificate ${vhost.sslCertificate};
ssl_certificate_key ${vhost.sslCertificateKey};
''}
${optionalString (hasSSL && vhost.sslTrustedCertificate != null) ''
ssl_trusted_certificate ${vhost.sslTrustedCertificate};
''}
${optionalString (vhost.basicAuthFile != null || vhost.basicAuth != {}) ''
auth_basic secured;

View File

@ -129,6 +129,13 @@ with lib;
description = "Path to server SSL certificate key.";
};
sslTrustedCertificate = mkOption {
type = types.path;
default = null;
example = "/var/root.cert";
description = "Path to root SSL certificate for stapling and client certificates.";
};
http2 = mkOption {
type = types.bool;
default = true;

View File

@ -324,7 +324,7 @@ in
[ "aes" "aes_generic" "blowfish" "twofish"
"serpent" "cbc" "xts" "lrw" "sha1" "sha256" "sha512"
(if pkgs.stdenv.system == "x86_64-linux" then "aes_x86_64" else "aes_i586")
(if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "aes_x86_64" else "aes_i586")
];
description = ''
A list of cryptographic kernel modules needed to decrypt the root device(s).

View File

@ -77,7 +77,7 @@ in
config = mkIf cfg.enable {
assertions = [ {
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
message = "Azure not currently supported on ${pkgs.stdenv.system}";
message = "Azure not currently supported on ${pkgs.stdenv.hostPlatform.system}";
} {
assertion = config.networking.networkmanager.enable == false;
message = "Windows Azure Linux Agent is not compatible with NetworkManager";

View File

@ -26,7 +26,7 @@ in
rm $diskImageBase
popd
'';
diskImageBase = "nixos-image-${config.system.nixos.label}-${pkgs.stdenv.system}.raw";
diskImageBase = "nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw";
buildInputs = [ pkgs.utillinux pkgs.perl ];
exportReferencesGraph =
[ "closure" config.system.build.toplevel ];

View File

@ -14,7 +14,7 @@ in
PATH=$PATH:${pkgs.stdenv.lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]}
pushd $out
mv $diskImage disk.raw
tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.system}.raw.tar.gz disk.raw
tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw.tar.gz disk.raw
rm $out/disk.raw
popd
'';

View File

@ -34,7 +34,7 @@ in
config = mkIf cfg.enable (mkMerge [{
assertions = [{
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
message = "Virtualbox not currently supported on ${pkgs.stdenv.system}";
message = "Virtualbox not currently supported on ${pkgs.stdenv.hostPlatform.system}";
}];
environment.systemPackages = [ kernel.virtualboxGuestAdditions ];

View File

@ -26,21 +26,21 @@ in {
};
vmDerivationName = mkOption {
type = types.str;
default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.system}";
default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
description = ''
The name of the derivation for the VirtualBox appliance.
'';
};
vmName = mkOption {
type = types.str;
default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.system})";
default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.hostPlatform.system})";
description = ''
The name of the VirtualBox appliance.
'';
};
vmFileName = mkOption {
type = types.str;
default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.system}.ova";
default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.ova";
description = ''
The file name of the VirtualBox appliance.
'';
@ -67,10 +67,10 @@ in {
echo "creating VirtualBox VM..."
vmName="${cfg.vmName}";
VBoxManage createvm --name "$vmName" --register \
--ostype ${if pkgs.stdenv.system == "x86_64-linux" then "Linux26_64" else "Linux26"}
--ostype ${if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "Linux26_64" else "Linux26"}
VBoxManage modifyvm "$vmName" \
--memory ${toString cfg.memorySize} --acpi on --vram 32 \
${optionalString (pkgs.stdenv.system == "i686-linux") "--pae on"} \
${optionalString (pkgs.stdenv.hostPlatform.system == "i686-linux") "--pae on"} \
--nictype1 virtio --nic1 nat \
--audiocontroller ac97 --audio alsa \
--rtcuseutc on \

View File

@ -22,7 +22,7 @@ in
config = mkIf cfg.enable {
assertions = [ {
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
message = "VMWare guest is not currently supported on ${pkgs.stdenv.system}";
message = "VMWare guest is not currently supported on ${pkgs.stdenv.hostPlatform.system}";
} ];
environment.systemPackages = [ open-vm-tools ];

View File

@ -146,7 +146,7 @@ in
config = mkIf cfg.enable {
assertions = [ {
assertion = pkgs.stdenv.isx86_64;
message = "Xen currently not supported on ${pkgs.stdenv.system}";
message = "Xen currently not supported on ${pkgs.stdenv.hostPlatform.system}";
} {
assertion = config.boot.loader.grub.enable && (config.boot.loader.grub.efiSupport == false);
message = "Xen currently does not support EFI boot";

View File

@ -6,7 +6,8 @@ let
{ pkgs, ... }:
{ fileSystems = pkgs.lib.mkVMOverride
[ { mountPoint = "/data";
device = "server:/data";
# nfs4 exports the export with fsid=0 as a virtual root directory
device = if (version == 4) then "server:/" else "server:/data";
fsType = "nfs";
options = [ "vers=${toString version}" ];
}

View File

@ -4,7 +4,7 @@ let
version = "0.11.1";
name = "mist";
throwSystem = throw "Unsupported system: ${stdenv.system}";
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
meta = with stdenv.lib; {
description = "Browse and use Ðapps on the Ethereum network";
@ -37,7 +37,7 @@ let
url = "https://github.com/ethereum/mist/releases/download/v${version}/Mist-linux64-${urlVersion}.zip";
sha256 = "0yx4x72l8gk68yh9saki48zgqx8k92xnkm79dc651wdpd5c25cz3";
};
}.${stdenv.system} or throwSystem;
}.${stdenv.hostPlatform.system} or throwSystem;
buildInputs = [ unzip makeWrapper ];

View File

@ -11,18 +11,18 @@ stdenv.mkDerivation rec {
version = "1.08";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "http://www.baudline.com/baudline_${version}_linux_x86_64.tar.gz";
sha256 = "09fn0046i69in1jpizkzbaq5ggij0mpflcsparyskm3wh71mbzvr";
}
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "http://www.baudline.com/baudline_${version}_linux_i686.tar.gz";
sha256 = "1waip5pmcf5ffcfvn8lf1rvsaq2ab66imrbfqs777scz7k8fhhjb";
}
else
throw "baudline isn't supported (yet?) on ${stdenv.system}";
throw "baudline isn't supported (yet?) on ${stdenv.hostPlatform.system}";
buildInputs = [ makeWrapper ];

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl
, flac, expat, libidn, qtbase, qtwebkit, libvorbis }:
assert stdenv.system == "x86_64-linux";
assert stdenv.hostPlatform.system == "x86_64-linux";
stdenv.mkDerivation rec {
version = "beta_1.0.467.4929-r0"; # friendly to nix-env version sorting algo

View File

@ -1,6 +1,5 @@
{ stdenv
, fetchurl, alsaLib
, hostPlatform
}:
stdenv.mkDerivation rec {
@ -13,8 +12,9 @@ stdenv.mkDerivation rec {
buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
configureFlags =
stdenv.lib.optional (hostPlatform ? mpg123) "--with-cpu=${hostPlatform.mpg123.cpu}";
configureFlags = stdenv.lib.optional
(stdenv.hostPlatform ? mpg123)
"--with-cpu=${stdenv.hostPlatform.mpg123.cpu}";
meta = {
description = "Fast console MPEG Audio Player and decoder library";

View File

@ -43,13 +43,13 @@ let
];
in stdenv.mkDerivation rec {
name = "pulseeffects-${version}";
version = "4.2.8";
version = "4.3.3";
src = fetchFromGitHub {
owner = "wwmm";
repo = "pulseeffects";
rev = "v${version}";
sha256 = "0ckl0640n6lhk0gcmnmwngajkf46rrd8bxfh7xy5sq6qmm01dhdd";
sha256 = "1krfxvwqimfcsv7f2l722ivzz0qdf5h0pmb702mg65qb160zn065";
};
nativeBuildInputs = [

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
version = "3.1.0";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
if builtins.isNull releasePath then
fetchurl {
url = "https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86_64.tar.bz2";
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
}
else
releasePath
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
if builtins.isNull releasePath then
fetchurl {
url = "http://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86.tar.bz2";

View File

@ -3,15 +3,16 @@
, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_0_10, curl, zlib, gnome3 }:
let
# TO UPDATE: just execute the ./update.sh script (won't do anything if there is no update)
# "rev" decides what is actually being downloaded
version = "1.0.80.474.gef6b503e-7";
version = "1.0.88.353.g15c26ea1-14";
# To get the latest stable revision:
# curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=stable' | jq '.download_url,.version,.last_updated'
# To get general information:
# curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/spotify' | jq '.'
# More exapmles of api usage:
# https://github.com/canonical-websites/snapcraft.io/blob/master/webapp/publisher/snaps/views.py
rev = "16";
rev = "19";
deps = [
@ -64,7 +65,7 @@ stdenv.mkDerivation {
# https://community.spotify.com/t5/Desktop-Linux/Redistribute-Spotify-on-Linux-Distributions/td-p/1695334
src = fetchurl {
url = "https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_${rev}.snap";
sha512 = "45b7ab574b30fb368e0b6f4dd60addbfd1ddc02173b4f98b31c524eed49073432352a361e75959ce8e2f752231e93c79ca1b538c4bd295c935d1e2e0585d147f";
sha512 = "3a068cbe3c1fca84ae67e28830216f993aa459947517956897c3b3f63063005c9db646960e85185b149747ffc302060c208a7f9968ea69d50a3496067089f3db";
};
buildInputs = [ squashfsTools makeWrapper ];

0
pkgs/applications/audio/spotify/update.sh Normal file → Executable file
View File

View File

@ -7,12 +7,12 @@ stdenv.mkDerivation rec {
name = "transcribe-${version}";
version = "8.40";
src = if stdenv.system == "i686-linux" then
src = if stdenv.hostPlatform.system == "i686-linux" then
fetchzip {
url = "https://www.seventhstring.com/xscribe/downlinux32_old/xscsetup.tar.gz";
sha256 = "1ngidmj9zz8bmv754s5xfsjv7v6xr03vck4kigzq4bpc9b1fdhjq";
}
else if stdenv.system == "x86_64-linux" then
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchzip {
url = "https://www.seventhstring.com/xscribe/downlinux64_old/xsc64setup.tar.gz";
sha256 = "0svzi8svj6zn06gj0hr8mpnhq4416dvb4g5al0gpb1g3paywdaf9";

View File

@ -9,15 +9,17 @@ with stdenv.lib;
stdenv.mkDerivation rec {
pname = "lightdm";
version = "1.26.0";
version = "1.28.0";
name = "${pname}-${version}";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "CanonicalLtd";
repo = pname;
rev = version;
sha256 = "1mhj6l025cnf2dzxnbzlk0qa9fm4gj2aw58qh5fl4ky87dp4wdyb";
sha256 = "1mmqy1jdvgc0h0h9gli7n4vdv5p8m5019qjr5ni4h73iz6mjdj2b";
};
nativeBuildInputs = [
@ -73,6 +75,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = https://github.com/CanonicalLtd/lightdm;
description = "A cross-desktop display manager.";
platforms = platforms.linux;
license = licenses.gpl3;
maintainers = with maintainers; [ ocharles wkennington worldofpeace ];

View File

@ -2,7 +2,7 @@
, zlib, jdk, glib, gtk3, libXtst, gsettings-desktop-schemas, webkitgtk
, makeWrapper, ... }:
{ name, src ? builtins.getAttr stdenv.system sources, sources ? null, description }:
{ name, src ? builtins.getAttr stdenv.hostPlatform.system sources, sources ? null, description }:
stdenv.mkDerivation rec {
inherit name src;

View File

@ -27,24 +27,24 @@ rec {
name = "eclipse-cpp-4.7.0";
description = "Eclipse IDE for C/C++ Developers, Oxygen release";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/R/eclipse-cpp-oxygen-R-linux-gtk-x86_64.tar.gz;
sha512 = "813c791e739d7d0e2ab242a5bacadca135bbeee20ef97aa830353cd90f63fa6e9c89cfcc6aadf635c742befe035bd6e3f15103013f63c419f6144e86ebde3ed1";
}
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/R/eclipse-cpp-oxygen-R-linux-gtk.tar.gz;
sha512 = "2b50f4a00306a89cda1aaaa606e62285cacbf93464a9dd3f3319dca3e2c578b802e685de6f78e5e617d269e21271188effe73d41f491a6de946e28795d82db8a";
}
else throw "Unsupported system: ${stdenv.system}";
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
};
eclipse-cpp-37 = buildEclipse {
name = "eclipse-cpp-3.7";
description = "Eclipse IDE for C/C++ Developers";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/indigo/R/eclipse-cpp-indigo-incubation-linux-gtk-x86_64.tar.gz;
sha256 = "14ppc9g9igzvj1pq7jl01vwhzb66nmzbl9wsdl1sf3xnwa9wnqk3";
@ -65,7 +65,7 @@ rec {
name = "eclipse-modeling-4.7";
description = "Eclipse Modeling Tools";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/oxygen/R/eclipse-modeling-oxygen-R-linux-gtk-x86_64.tar.gz;
sha512 = "3b9a7ad4b5d6b77fbdd64e8d323e0adb6c2904763ad042b374b4d87cef8607408cb407e395870fc755d58c0c800e20818adcf456ebe193d76cede16c5fe12271";
@ -81,7 +81,7 @@ rec {
name = "eclipse-modeling-3.6.2";
description = "Eclipse Modeling Tools (includes Incubating components)";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/helios/SR2/eclipse-modeling-helios-SR2-incubation-linux-gtk-x86_64.tar.gz;
sha1 = "e96f5f006298f68476f4a15a2be8589158d5cc61";
@ -151,7 +151,7 @@ rec {
name = "eclipse-scala-sdk-4.4.1";
description = "Eclipse IDE for Scala Developers";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { # tested
url = https://downloads.typesafe.com/scalaide-pack/4.4.1-vfinal-luna-211-20160504/scala-SDK-4.4.1-vfinal-2.11-linux.gtk.x86_64.tar.gz;
sha256 = "4c2d1ac68384e12a11a851cf0fc7757aea087eba69329b21d539382a65340d27";

View File

@ -1,5 +1,4 @@
{ stdenv, fetchurl, lzip
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation (rec {
@ -36,7 +35,7 @@ stdenv.mkDerivation (rec {
maintainers = [ ];
platforms = stdenv.lib.platforms.unix;
};
} // stdenv.lib.optionalAttrs (hostPlatform != buildPlatform) {
} // stdenv.lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
# This may be moved above during a stdenv rebuild.
preConfigure = ''
configureFlagsArray+=("CC=$CC")

View File

@ -42,7 +42,7 @@ with stdenv; lib.makeOverridable mkDerivation rec {
}
interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2)
if [ "${stdenv.system}" == "x86_64-linux" ]; then
if [ "${stdenv.hostPlatform.system}" == "x86_64-linux" ]; then
target_size=$(get_file_size bin/fsnotifier64)
patchelf --set-interpreter "$interpreter" bin/fsnotifier64
munge_size_hack bin/fsnotifier64 $target_size

View File

@ -8,15 +8,15 @@ let
version = "17.1";
sha256 = if stdenv.system == "x86_64-linux" then "1kddisnvlk48jip6k59mw3wlkrl7rkck2lxpaghn0gfx02cvms5f"
else if stdenv.system == "i686-cygwin" then "1izp42afrlh4yd322ax9w85ki388gnkqfqbw8dwnn4k3j7r5487z"
else throw "Unsupported system: ${stdenv.system}";
sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1kddisnvlk48jip6k59mw3wlkrl7rkck2lxpaghn0gfx02cvms5f"
else if stdenv.hostPlatform.system == "i686-cygwin" then "1izp42afrlh4yd322ax9w85ki388gnkqfqbw8dwnn4k3j7r5487z"
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
urlBase = "https://github.com/Kode/KodeStudio/releases/download/v${version}/KodeStudio-";
urlStr = if stdenv.system == "x86_64-linux" then urlBase + "linux64.tar.gz"
else if stdenv.system == "i686-cygwin" then urlBase + "win32.zip"
else throw "Unsupported system: ${stdenv.system}";
urlStr = if stdenv.hostPlatform.system == "x86_64-linux" then urlBase + "linux64.tar.gz"
else if stdenv.hostPlatform.system == "i686-cygwin" then urlBase + "win32.zip"
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
in
@ -47,7 +47,7 @@ in
cp -r ./* $out
'';
postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") ''
postFixup = lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") ''
# Patch Binaries
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, swt, jdk, makeWrapper, alsaLib }:
let metadata = assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
if stdenv.system == "i686-linux" then
let metadata = assert stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux";
if stdenv.hostPlatform.system == "i686-linux" then
{ arch = "x86"; sha256 = "1qmb51k0538pn7gv4nsvhfv33xik4l4af0qmpllkzrikmj8wvzlb"; }
else
{ arch = "x86_64"; sha256 = "12af47jhlrh9aq5b3d13l7cdhlndgnfpy61gz002hajbq7i00ixh"; };

View File

@ -6,7 +6,7 @@ in
stdenv.mkDerivation rec {
name = "sublimetext-2.0.2";
src =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
name = "sublimetext-2.0.2.tar.bz2";
url = http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.tar.bz2;

View File

@ -13,13 +13,13 @@ let
++ stdenv.lib.optional gksuSupport "/usr/bin/gksudo=${gksu}/bin/gksudo";
in let
archSha256 =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
x32sha256
else
x64sha256;
arch =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
"x32"
else
"x64";

View File

@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
version = "0.9.53";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://www.typora.io/linux/typora_${version}_amd64.deb";
sha256 = "02k6x30l4mbjragqbq5rn663xbw3h4bxzgppfxqf5lwydswldklb";

View File

@ -7,7 +7,6 @@
}
# apple frameworks
, Carbon, Cocoa
, buildPlatform, hostPlatform
}:
let
@ -20,12 +19,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ gettext pkgconfig ];
buildInputs = [ ncurses ]
++ stdenv.lib.optionals hostPlatform.isDarwin [ Carbon Cocoa ];
++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa ];
configureFlags = [
"--enable-multibyte"
"--enable-nls"
] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"vim_cv_toupper_broken=no"
"--with-tlib=ncurses"
"vim_cv_terminfo=yes"

View File

@ -9,15 +9,15 @@ let
"i686-linux" = "linux-ia32";
"x86_64-linux" = "linux-x64";
"x86_64-darwin" = "darwin";
}.${stdenv.system};
}.${stdenv.hostPlatform.system};
sha256 = {
"i686-linux" = "1g7kqbz6mrf8ngx2bnwpi9fifq5rjznxgsgwjb532z3nh92ypa8n";
"x86_64-linux" = "02yldycakn5zxj1ji4nmhdyazqlkjqpzdj3g8j501c3j28pgiwjy";
"x86_64-darwin" = "0pnsfkh20mj7pzqw7wlfd98jqc6a1mnsq1iira15n7fafqgj8zpl";
}.${stdenv.system};
}.${stdenv.hostPlatform.system};
archive_fmt = if stdenv.system == "x86_64-darwin" then "zip" else "tar.gz";
archive_fmt = if stdenv.hostPlatform.system == "x86_64-darwin" then "zip" else "tar.gz";
rpath = lib.concatStringsSep ":" [
atomEnv.libPath
@ -48,12 +48,12 @@ in
categories = "GNOME;GTK;Utility;TextEditor;Development;";
};
buildInputs = if stdenv.system == "x86_64-darwin"
buildInputs = if stdenv.hostPlatform.system == "x86_64-darwin"
then [ unzip libXScrnSaver libsecret ]
else [ wrapGAppsHook libXScrnSaver libxkbfile libsecret ];
installPhase =
if stdenv.system == "x86_64-darwin" then ''
if stdenv.hostPlatform.system == "x86_64-darwin" then ''
mkdir -p $out/lib/vscode $out/bin
cp -r ./* $out/lib/vscode
ln -s $out/lib/vscode/Contents/Resources/app/bin/code $out/bin
@ -72,7 +72,7 @@ in
cp $out/lib/vscode/resources/app/resources/linux/code.png $out/share/pixmaps/code.png
'';
postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") ''
postFixup = lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${rpath}" \

View File

@ -2,15 +2,14 @@
, bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg
, lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp, libheif
, ApplicationServices
, hostPlatform
}:
let
arch =
if stdenv.system == "i686-linux" then "i686"
else if stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin" then "x86-64"
else if stdenv.system == "armv7l-linux" then "armv7l"
else if stdenv.system == "aarch64-linux" then "aarch64"
if stdenv.hostPlatform.system == "i686-linux" then "i686"
else if stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin" then "x86-64"
else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7l"
else if stdenv.hostPlatform.system == "aarch64-linux" then "aarch64"
else throw "ImageMagick is not supported on this platform.";
cfg = {
@ -46,7 +45,7 @@ stdenv.mkDerivation rec {
[ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts"
"--with-gslib"
]
++ lib.optionals hostPlatform.isMinGW
++ lib.optionals stdenv.hostPlatform.isMinGW
[ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM
;
@ -56,13 +55,13 @@ stdenv.mkDerivation rec {
[ zlib fontconfig freetype ghostscript
libpng libtiff libxml2 libheif
]
++ lib.optionals (!hostPlatform.isMinGW)
++ lib.optionals (!stdenv.hostPlatform.isMinGW)
[ openexr librsvg openjpeg ]
++ lib.optional stdenv.isDarwin ApplicationServices;
propagatedBuildInputs =
[ bzip2 freetype libjpeg lcms2 ]
++ lib.optionals (!hostPlatform.isMinGW)
++ lib.optionals (!stdenv.hostPlatform.isMinGW)
[ libX11 libXext libXt libwebp ]
;

View File

@ -2,15 +2,14 @@
, bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg
, lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp, fftw, libheif, libde265
, ApplicationServices
, hostPlatform
}:
let
arch =
if stdenv.system == "i686-linux" then "i686"
else if stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin" then "x86-64"
else if stdenv.system == "armv7l-linux" then "armv7l"
else if stdenv.system == "aarch64-linux" then "aarch64"
if stdenv.hostPlatform.system == "i686-linux" then "i686"
else if stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin" then "x86-64"
else if stdenv.hostPlatform.system == "armv7l-linux" then "armv7l"
else if stdenv.hostPlatform.system == "aarch64-linux" then "aarch64"
else throw "ImageMagick is not supported on this platform.";
cfg = {
@ -20,7 +19,7 @@ let
}
# Freeze version on mingw so we don't need to port the patch too often.
# FIXME: This version has multiple security vulnerabilities
// lib.optionalAttrs (hostPlatform.isMinGW) {
// lib.optionalAttrs (stdenv.hostPlatform.isMinGW) {
version = "6.9.2-0";
sha256 = "17ir8bw1j7g7srqmsz3rx780sgnc21zfn0kwyj78iazrywldx8h7";
patches = [(fetchpatch {
@ -58,7 +57,7 @@ stdenv.mkDerivation rec {
[ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts"
"--with-gslib"
]
++ lib.optionals (hostPlatform.isMinGW)
++ lib.optionals (stdenv.hostPlatform.isMinGW)
[ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM
;
@ -68,13 +67,13 @@ stdenv.mkDerivation rec {
[ zlib fontconfig freetype ghostscript
libpng libtiff libxml2 libheif libde265
]
++ lib.optionals (!hostPlatform.isMinGW)
++ lib.optionals (!stdenv.hostPlatform.isMinGW)
[ openexr librsvg openjpeg ]
++ lib.optional stdenv.isDarwin ApplicationServices;
propagatedBuildInputs =
[ bzip2 freetype libjpeg lcms2 fftw ]
++ lib.optionals (!hostPlatform.isMinGW)
++ lib.optionals (!stdenv.hostPlatform.isMinGW)
[ libX11 libXext libXt libwebp ]
;

View File

@ -3,7 +3,7 @@
let version = "0.4"; in
stdenv.mkDerivation {
name = "gcolor2-${version}";
arch = if stdenv.system == "x86_64-linux" then "amd64" else "386";
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd64" else "386";
src = fetchurl {
url = "mirror://sourceforge/project/gcolor2/gcolor2/${version}/gcolor2-${version}.tar.bz2";
@ -16,7 +16,7 @@ stdenv.mkDerivation {
'';
# from https://github.com/PhantomX/slackbuilds/tree/master/gcolor2/patches
patches = if stdenv.system == "x86_64-linux" then
patches = if stdenv.hostPlatform.system == "x86_64-linux" then
[ ./gcolor2-amd64.patch ] else
[ ];

View File

@ -12,17 +12,17 @@ let
in stdenv.mkDerivation rec {
name = "brscan4-0.4.4-4";
src =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "http://download.brother.com/welcome/dlf006646/${name}.i386.deb";
sha256 = "13mhjbzf9nvpdzrc2s98684r7likg76zxs1wlz2h8w59fsqgx4k2";
}
else if stdenv.system == "x86_64-linux" then
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://download.brother.com/welcome/dlf006645/${name}.amd64.deb";
sha256 = "0xy5px96y1saq9l80vwvfn6anr2q42qlxdhm6ci2a0diwib5q9fd";
}
else throw "${name} is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)";
else throw "${name} is not supported on ${stdenv.hostPlatform.system} (only i686-linux and x86_64 linux are supported)";
unpackPhase = ''
ar x $src

View File

@ -17,12 +17,12 @@
let
version = "1.0";
arch = if stdenv.system == "x86_64-linux" then
arch = if stdenv.hostPlatform.system == "x86_64-linux" then
"x64"
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
"x86"
else
throw "Unsupported platform ${stdenv.system}";
throw "Unsupported platform ${stdenv.hostPlatform.system}";
in
stdenv.mkDerivation rec {

View File

@ -4,19 +4,19 @@ stdenv.mkDerivation rec {
name = "1password-${version}";
version = "0.5.3";
src =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
fetchzip {
url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_386_v${version}.zip";
sha256 = "05s223h1yps4k9kmignl0r5sbh6w7m1hnlmafnf1kiwv7gacvxjc";
stripRoot = false;
}
else if stdenv.system == "x86_64-linux" then
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchzip {
url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_linux_amd64_v${version}.zip";
sha256 = "0p9x1fx0309v8dxxaf88m8x8q15zzqywfmjn6v5wb9v3scp9396v";
stripRoot = false;
}
else if stdenv.system == "x86_64-darwin" then
else if stdenv.hostPlatform.system == "x86_64-darwin" then
fetchzip {
url = "https://cache.agilebits.com/dist/1P/op/pkg/v${version}/op_darwin_amd64_v${version}.zip";
sha256 = "1z2xp9bn93gr4ha6zx65va1fb58a2xlnnmpv583y96gq3vbnqdcj";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, libX11, cups, zlib, libxml2, pango, atk, gtk2, glib
, gdk_pixbuf }:
assert stdenv.system == "i686-linux";
assert stdenv.hostPlatform.system == "i686-linux";
let version = "9.5.5"; in

View File

@ -8,17 +8,17 @@ stdenv.mkDerivation rec {
version = "15.02.1-1.03-5064";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-amd64/cura_${version}_amd64.deb";
sha256 = "1gsfidg3gim5pjbl82vkh0cw4ya253m4p7nirm8nr6yjrsirkzxg";
}
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "http://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-i386/cura_${version}_i386.deb";
sha256 = "0xd3df6bxq4rijgvsqvps454jkc1nzhxbdzzj6j2w317ppsbhyc1";
}
else throw "${name} is not supported on ${stdenv.system}";
else throw "${name} is not supported on ${stdenv.hostPlatform.system}";
python_deps = with py; [ pyopengl pyserial numpy wxPython30 power setuptools ];
pythonPath = python_deps;

View File

@ -4,9 +4,9 @@
let
arch =
if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.system == "i686-linux" then "i386"
else throw "Unsupported system ${stdenv.system}";
if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
else if stdenv.hostPlatform.system == "i686-linux" then "i386"
else throw "Unsupported system ${stdenv.hostPlatform.system}";
sha256 =
if arch == "amd64"
then "0dwnppn5snl5bwkdrgj4cyylnhngi0g66fn2k41j3dvis83x24k6"

View File

@ -6,10 +6,10 @@ stdenv.mkDerivation rec {
name = "iceSL-${version}";
version = "2.1.10";
src = if stdenv.system == "x86_64-linux" then fetchzip {
src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip {
url = "https://gforge.inria.fr/frs/download.php/file/37268/icesl${version}-amd64.zip";
sha256 = "0dv3mq6wy46xk9blzzmgbdxpsjdaxid3zadfrysxlhmgl7zb2cn2";
} else if stdenv.system == "i686-linux" then fetchzip {
} else if stdenv.hostPlatform.system == "i686-linux" then fetchzip {
url = "https://gforge.inria.fr/frs/download.php/file/37267/icesl${version}-i386.zip";
sha256 = "0sl54fsb2gz6dy0bwdscpdq1ab6ph5b7zald3bwzgkqsvna7p1jr";
} else throw "Unsupported architecture";

View File

@ -1,6 +1,6 @@
{ stdenv, requireFile, unzip, rlwrap, bash }:
assert (stdenv.system == "i686-linux");
assert (stdenv.hostPlatform.system == "i686-linux");
let
libPath = stdenv.lib.makeLibraryPath

View File

@ -25,7 +25,7 @@ let
sha256 = "1h9vcbvf8wgds6i2z20y7krpys0mqsqhv1ijyfljanp6vyll9fvi";
};
xulrunner = if stdenv.system == "x86_64-linux"
xulrunner = if stdenv.hostPlatform.system == "x86_64-linux"
then { tar = xulrunner64_tar; sdk = xulrunnersdk64_tar; }
else { tar = xulrunner32_tar; sdk = xulrunnersdk32_tar; };

View File

@ -0,0 +1,47 @@
{ stdenv
, dbus-glib
, fetchurl
, glib
, gnome3
, libnotify
, libtool
, libwnck3
, makeWrapper
, pkgconfig
}:
let baseURI = "https://launchpad.net/~leolik/+archive/leolik";
in stdenv.mkDerivation rec {
name = "notify-osd-${version}";
version = "0.9.35+16.04.20160415";
src = fetchurl {
url = "${baseURI}/+files/notify-osd_${version}-0ubuntu1-leolik~ppa0.tar.gz";
sha256 = "026dr46jh3xc4103wnslzy7pxbxkkpflh52c59j8vzwaa7bvvzkv";
name = "notify-osd-customizable.tar.gz";
};
preConfigure = "./autogen.sh --libexecdir=$(out)/bin";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
glib libwnck3 libnotify dbus-glib makeWrapper
gnome3.gsettings-desktop-schemas gnome3.gnome-common
libtool
];
configureFlags = "--libexecdir=$(out)/bin";
preFixup = ''
wrapProgram "$out/bin/notify-osd" \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
'';
meta = with stdenv.lib; {
description = "Daemon that displays passive pop-up notifications";
homepage = https://launchpad.net/notify-osd;
license = licenses.gpl3;
maintainers = [ maintainers.imalison ];
platforms = platforms.linux;
};
}

View File

@ -44,9 +44,9 @@ let
];
ld32 =
if stdenv.system == "x86_64-linux" then "${stdenv.cc}/nix-support/dynamic-linker-m32"
else if stdenv.system == "i686-linux" then "${stdenv.cc}/nix-support/dynamic-linker"
else throw "Unsupported platform for PlayOnLinux: ${stdenv.system}";
if stdenv.hostPlatform.system == "x86_64-linux" then "${stdenv.cc}/nix-support/dynamic-linker-m32"
else if stdenv.hostPlatform.system == "i686-linux" then "${stdenv.cc}/nix-support/dynamic-linker"
else throw "Unsupported platform for PlayOnLinux: ${stdenv.hostPlatform.system}";
ld64 = "${stdenv.cc}/nix-support/dynamic-linker";
libs = pkgs: stdenv.lib.makeLibraryPath [ pkgs.xorg.libX11 ];
@ -83,7 +83,7 @@ in stdenv.mkDerivation {
bunzip2 $out/share/playonlinux/bin/check_dd_x86.bz2
patchelf --set-interpreter $(cat ${ld32}) --set-rpath ${libs pkgsi686Linux} $out/share/playonlinux/bin/check_dd_x86
${if stdenv.system == "x86_64-linux" then ''
${if stdenv.hostPlatform.system == "x86_64-linux" then ''
bunzip2 $out/share/playonlinux/bin/check_dd_amd64.bz2
patchelf --set-interpreter $(cat ${ld64}) --set-rpath ${libs pkgs} $out/share/playonlinux/bin/check_dd_amd64
'' else ''

View File

@ -2,7 +2,7 @@
let
src =
if stdenv.system == "i686-linux" then fetchurl {
if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
name = "rescuetime-installer.deb";
url = "https://www.rescuetime.com/installers/rescuetime_current_i386.deb";
sha256 = "06q1jwqsrjvlj820dd4vl80jznwafsqshsg0p6si8qx4721blryz";

View File

@ -55,7 +55,7 @@ let
makeWrapper ${jre}/bin/java $out/bin/$exec \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
--add-flags "-jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar ${if stdenv.system == "x86_64-linux" then "-d64" else "-d32"}"
--add-flags "-jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}"
'';
dontStrip = true;

View File

@ -44,7 +44,7 @@ let
cp "${editorItem}/share/applications/"* $out/share/applications
makeWrapper ${jre}/bin/java $out/bin/$exec \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
--add-flags "-jar $out/share/java/${module}-${version}.jar ${if stdenv.system == "x86_64-linux" then "-d64" else "-d32"}"
--add-flags "-jar $out/share/java/${module}-${version}.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}"
'';
dontStrip = true;

View File

@ -4,13 +4,13 @@ stdenv.mkDerivation rec {
name = "xmind-${version}";
version = "7.5-update1";
src = if stdenv.system == "i686-linux" then fetchurl {
src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_i386.deb";
sha256 = "04kr6pw0kwy715bp9wcnqnw1k5wl65xa87lhljrskm291p402jy1";
} else if stdenv.system == "x86_64-linux" then fetchurl {
} else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
url = "http://dl2.xmind.net/xmind-downloads/${name}-linux_amd64.deb";
sha256 = "1j2ynhk7p3m3vd6c4mjwpnlzqgfj5c4q3zydab3nfwncwx6gaqj9";
} else throw "platform ${stdenv.system} not supported!";
} else throw "platform ${stdenv.hostPlatform.system} not supported!";
nativeBuildInputs = [ dpkg makeWrapper ];

View File

@ -21,17 +21,17 @@ stdenv.mkDerivation rec {
version = "2.0.0.v20170904-M13";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86_64.tar.gz";
sha256 = "1jfnm6m0ijk31r30hhrxxnizk742dm317iny041p29v897rma7aq";
}
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86.tar.gz";
sha256 = "1bxmgram42qyhrqkgp5k8770f5mjjdd4c6xl4gj09smiycm1qa4n";
}
else throw "Unsupported system: ${stdenv.system}";
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
buildInputs = [ makeWrapper ];

View File

@ -4,9 +4,9 @@ let
arch = {
"x86_64-linux" = "x64";
"i686-linux" = "i386";
}.${stdenv.system} or throwSystem;
}.${stdenv.hostPlatform.system} or throwSystem;
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ];
throwSystem = throw "Unsupported system: ${stdenv.system}";
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
in
stdenv.mkDerivation rec {
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
"https://download-cdn.getsync.com/${version}/linux-${arch}/BitTorrent-Sync_${arch}.tar.gz"
"http://syncapp.bittorrent.com/${version}/btsync_${arch}-${version}.tar.gz"
];
sha256 = sha256s.${stdenv.system} or throwSystem;
sha256 = sha256s.${stdenv.hostPlatform.system} or throwSystem;
};
dontStrip = true; # Don't strip, otherwise patching the rpaths breaks

View File

@ -59,7 +59,7 @@ let
"x86_64-linux" = "linux-x86_64";
};
arch = mozillaPlatforms.${stdenv.system};
arch = mozillaPlatforms.${stdenv.hostPlatform.system};
isPrefixOf = prefix: string:
builtins.substring 0 (builtins.stringLength prefix) string == prefix;

View File

@ -36,10 +36,10 @@ let
jre = cfg.jre or false;
icedtea = cfg.icedtea or false;
supportsJDK =
stdenv.system == "i686-linux" ||
stdenv.system == "x86_64-linux" ||
stdenv.system == "armv7l-linux" ||
stdenv.system == "aarch64-linux";
stdenv.hostPlatform.system == "i686-linux" ||
stdenv.hostPlatform.system == "x86_64-linux" ||
stdenv.hostPlatform.system == "armv7l-linux" ||
stdenv.hostPlatform.system == "aarch64-linux";
plugins =
assert !(jre && icedtea);

View File

@ -60,13 +60,13 @@
let
arch =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
"x86_64"
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
"i386"
else throw "Flash Player is not supported on this platform";
lib_suffix =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
"64"
else
"";

View File

@ -54,12 +54,12 @@ stdenv.mkDerivation rec {
version = "5.41.3.0";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "${baseURL}/google-talkplugin_${version}-1_amd64.deb";
sha1 = "0bbc3d6997ba22ce712d93e5bc336c894b54fc81";
}
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "${baseURL}/google-talkplugin_${version}-1_i386.deb";
sha1 = "6eae0544858f85c68b0cc46d7786e990bd94f139";

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation {
};
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = https://mytrezor.com/data/plugin/1.0.5/browser-plugin-trezor_1.0.5_amd64.deb;
sha256 = "0097h4v88yca4aayzprrh4pk03xvvj7ncz2mi83chm81gsr2v67z";

View File

@ -51,6 +51,9 @@
# Extra preferences
, extraPrefs ? ""
# For meta
, tor-browser-bundle
}:
with stdenv.lib;
@ -125,7 +128,7 @@ stdenv.mkDerivation rec {
name = "tor-browser-bundle-bin-${version}";
inherit version;
src = srcs."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}");
src = srcs."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}");
preferLocalBuild = true;
allowSubstitutes = false;
@ -397,7 +400,8 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
description = "Tor Browser Bundle";
description = "Tor Browser Bundle built by torproject.org";
longDescription = tor-browser-bundle.meta.longDescription;
homepage = https://www.torproject.org/;
platforms = attrNames srcs;
maintainers = with maintainers; [ offline matejc doublec thoughtpolice joachifm ];

View File

@ -339,7 +339,29 @@ stdenv.mkDerivation rec {
passthru.execdir = "/bin";
meta = with stdenv.lib; {
description = "An unofficial version of the tor browser bundle, built from source";
description = "An unofficial version of the Tor Browser Bundle, built from source";
longDescription = ''
Tor Browser Bundle is a bundle of the Tor daemon, Tor Browser (heavily patched version of
Firefox), several essential extensions for Tor Browser, and some tools that glue those
together with a convenient UI.
`tor-browser-bundle-bin` package is the official version built by torproject.org patched with
`patchelf` to work under nix and with bundled scripts adapted to the read-only nature of
the `/nix/store`.
`tor-browser-bundle` package is the version built completely from source. It reuses the `tor`
package for the tor daemon, `firefoxPackages.tor-browser` package for the tor-browser, and
builds all the extensions from source.
Note that `tor-browser-bundle` package is not only built from source, but also bundles Tor
Browser differently from the official `tor-browser-bundle-bin` implementation. The official
Tor Browser is not a normal UNIX program and is heavily patched for its use in the Tor Browser
Bundle (which `tor-browser-bundle-bin` package then has to work around for the read-only
/nix/store). Meanwhile, `firefoxPackages.tor-browser` reverts all those patches, allowing
`firefoxPackages.tor-browser` to be used independently of the bundle, and then implements what
`tor-browser-bundle` needs for the bundling using a much simpler patch. See the
longDescription and expression of the `firefoxPackages.tor-browser` package for more info.
'';
homepage = https://torproject.org/;
license = licenses.free;
platforms = [ "x86_64-linux" ];

View File

@ -1,5 +1,5 @@
{ stdenv, buildGoPackage, fetchFromGitHub, go-bindata, libvirt, qemu
, gpgme, makeWrapper, hostPlatform, vmnet, python
, gpgme, makeWrapper, vmnet, python
, docker-machine-kvm, docker-machine-kvm2
, extraDrivers ? []
}:
@ -25,8 +25,8 @@ in buildGoPackage rec {
sha256 = "0c36rzsdzxf9q6l4hl506bsd4qwmw033i0k1xhqszv9agg7qjlmm";
};
buildInputs = [ go-bindata makeWrapper gpgme ] ++ stdenv.lib.optional hostPlatform.isDarwin vmnet;
subPackages = [ "cmd/minikube" ] ++ stdenv.lib.optional hostPlatform.isDarwin "cmd/drivers/hyperkit";
buildInputs = [ go-bindata makeWrapper gpgme ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin vmnet;
subPackages = [ "cmd/minikube" ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin "cmd/drivers/hyperkit";
preBuild = ''
pushd go/src/${goPackagePath} >/dev/null
@ -56,7 +56,7 @@ in buildGoPackage rec {
postFixup = ''
wrapProgram $bin/bin/${pname} --prefix PATH : $bin/bin:${stdenv.lib.makeBinPath binPath}
'' + stdenv.lib.optionalString hostPlatform.isDarwin ''
'' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
mv $bin/bin/hyperkit $bin/bin/docker-machine-driver-hyperkit
'';

View File

@ -2,7 +2,7 @@
let platforms = [ "i686-linux" "x86_64-linux" ]; in
assert lib.elem stdenv.system platforms;
assert lib.elem stdenv.hostPlatform.system platforms;
# Dropbox client to bootstrap installation.
# The client is self-updating, so the actual version may be newer.
@ -12,7 +12,7 @@ let
arch = {
"x86_64-linux" = "x86_64";
"i686-linux" = "x86";
}.${stdenv.system};
}.${stdenv.hostPlatform.system};
installer = "https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.${arch}-${version}.tar.gz";
in

View File

@ -2,11 +2,11 @@
, geoip, gperftools, python, swig }:
stdenv.mkDerivation rec {
name = "bro-2.5.4";
name = "bro-2.5.5";
src = fetchurl {
url = "https://www.bro.org/downloads/${name}.tar.gz";
sha256 = "07sz1i4ly30257677b8vfrbsvxhz2awijyzn5ihg4m567x1ymnl0";
sha256 = "1kvkiq8jjsqryry9jd4vw45pbfb46jly988mq62mv4sd1fqsxwhq";
};
nativeBuildInputs = [ cmake flex bison file ];

View File

@ -3,7 +3,7 @@
, gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }:
let
bits = if stdenv.system == "x86_64-linux" then "x64"
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
else "ia32";
version = "4.0.4";

View File

@ -41,18 +41,18 @@ in
version = "4.1.2";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://releases.mattermost.com/desktop/${version}/${name}-linux-x64.tar.gz";
sha256 = "16dn6870bs1nfl2082ym9gwvmqb3i5sli48qprap80p7riph6k9s";
}
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "https://releases.mattermost.com/desktop/${version}/${name}-linux-ia32.tar.gz";
sha256 = "145zb1l37fa2slfrrlprlwzcc5km3plxs374yhgix25mlg2afkqr";
}
else
throw "Mattermost-Desktop is not currently supported on ${stdenv.system}";
throw "Mattermost-Desktop is not currently supported on ${stdenv.hostPlatform.system}";
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
inherit version;
name = "sencha-bare-${version}";
src = srcs.${stdenv.system};
src = srcs.${stdenv.hostPlatform.system};
nativeBuildInputs = [ gzip which unzip ];
buildInputs = [ jdk ];

View File

@ -53,13 +53,13 @@ let
] + ":${stdenv.cc.cc.lib}/lib64";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb";
sha256 = "1kydf71qbz35dx4674h3nxfx8a88k620217906i54ic4qq2mgy2x";
}
else
throw "Skype for linux is not supported on ${stdenv.system}";
throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}";
in stdenv.mkDerivation {
name = "skypeforlinux-${version}";

View File

@ -44,13 +44,13 @@ let
] + ":${stdenv.cc.cc.lib}/lib64";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb";
sha256 = "095dpkwvvnwlxsglyg6wi9126wpalzi736b6g6j3bd6d93z9afah";
}
else
throw "Slack is not supported on ${stdenv.system}";
throw "Slack is not supported on ${stdenv.hostPlatform.system}";
in stdenv.mkDerivation {
name = "slack-${version}";

View File

@ -44,12 +44,12 @@ let
plat = {
"i686-linux" = "i386";
"x86_64-linux" = "amd64";
}.${stdenv.system};
}.${stdenv.hostPlatform.system};
sha256 = {
"i686-linux" = "071ddh2d8wmiybwafwyb97962zj358l0fq7g2r44231653sgybvq";
"x86_64-linux" = "0qp9ms94smnm7k47b0n0jdzvnm1b7gj25hyinsfc6lghrb6jqw3r";
}.${stdenv.system};
}.${stdenv.hostPlatform.system};
in
stdenv.mkDerivation rec {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, system, makeWrapper, makeDesktopItem, autoPatchelfHook, env
{ stdenv, fetchurl, makeWrapper, makeDesktopItem, autoPatchelfHook, env
# Dynamic libraries
, dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative
, qtimageformats, qtlocation, qtquickcontrols, qtquickcontrols2, qtscript, qtsvg
@ -31,7 +31,7 @@ let
in stdenv.mkDerivation {
name = "zoom-us-${version}";
src = srcs.${system};
src = srcs.${stdenv.hostPlatform.system};
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];

View File

@ -4,13 +4,13 @@ stdenv.mkDerivation rec {
name = "insync-${version}";
version = "1.4.5.37069";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "http://s.insynchq.com/builds/insync-portable_${version}_amd64.tar.bz2";
sha256 = "0mkqgpq4isngkj20c0ygmxf4cj975d446svhwvl3cqdrjkjm1ybd";
}
else
throw "${name} is not supported on ${stdenv.system}";
throw "${name} is not supported on ${stdenv.hostPlatform.system}";
buildInputs = [ makeWrapper ];

View File

@ -33,13 +33,13 @@ stdenv.mkDerivation rec {
subVersion = "fec7941";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://edgehill.s3.amazonaws.com/${version}-${subVersion}/linux-deb/x64/NylasMail.deb";
sha256 = "40060aa1dc3b5187b8ed4a07b9de3427e3c5a291df98c2c82395647fa2aa4ada";
}
else
throw "NylasMail is not supported on ${stdenv.system}";
throw "NylasMail is not supported on ${stdenv.hostPlatform.system}";
propagatedBuildInputs = [
alsaLib

View File

@ -47,7 +47,7 @@
with (import ./release_sources.nix);
let
arch = if stdenv.system == "i686-linux"
arch = if stdenv.hostPlatform.system == "i686-linux"
then "linux-i686"
else "linux-x86_64";

View File

@ -75,7 +75,7 @@ in stdenv.mkDerivation {
cp ${ { x86_64-darwin = "desktop/lib/native/*.dylib";
x86_64-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}.so";
i686-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}X86.so";
}.${stdenv.system} or (throw "unsupported system ${stdenv.system}")
}.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}")
} $out/lib
cp -dpR ${desktopItem}/share $out

View File

@ -37,7 +37,7 @@ in stdenv.mkDerivation rec {
name = "soulseekqt-${version}";
inherit version;
src = srcs."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}");
src = srcs."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}");
dontBuild = true;

View File

@ -3,6 +3,7 @@
python2Packages.buildPythonApplication rec {
pname = "zeronet";
version = "0.6.2";
format = "other";
src = fetchFromGitHub {
owner = "HelloZeroNet";
@ -12,9 +13,6 @@ python2Packages.buildPythonApplication rec {
};
propagatedBuildInputs = with python2Packages; [ msgpack gevent ];
format = "other";
buildPhase = "${python2Packages.python.interpreter} -O -m compileall .";
installPhase = ''
@ -22,14 +20,10 @@ python2Packages.buildPythonApplication rec {
cp -r plugins src tools *.py $out/share/
'';
# Wrap the main executable and set the log and data dir to something out of
# the store
postFixup = ''
makeWrapper "$out/share/zeronet.py" "$out/bin/zeronet" \
--set PYTHONPATH "$PYTHONPATH" \
--set PATH ${python2Packages.python}/bin \
--add-flags "--log_dir \$HOME/.local/share/zeronet/logs" \
--add-flags "--data_dir \$HOME/.local/share/zeronet"
--set PYTHONPATH "$PYTHONPATH" \
--set PATH ${python2Packages.python}/bin
'';
meta = with stdenv.lib; {

View File

@ -6,12 +6,12 @@ let
sha256 = {
"x86_64-linux" = "0g19sac4j3m1nf400vn6qcww7prqg2p4k4zsj74i109kk1396aa2";
"i686-linux" = "1dd4ai2pclav9g872xil3x67bxy32gvz9pb3w76383pcsdh5zh45";
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
}."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported");
arch = {
"x86_64-linux" = "amd64";
"i686-linux" = "i686";
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
}."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported");
description = "Desktop sharing application, providing remote support and online meetings";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool
{ stdenv, lib, fetchurl, autoconf, automake, pkgconfig, libtool
, gtk2, halibut, ncurses, perl
, hostPlatform, lib }:
}:
stdenv.mkDerivation rec {
version = "0.70";
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
sha256 = "1gmhwwj1y7b5hgkrkxpf4jddjpk9l5832zq5ibhsiicndsfs92mv";
};
preConfigure = lib.optionalString hostPlatform.isUnix ''
preConfigure = lib.optionalString stdenv.hostPlatform.isUnix ''
perl mkfiles.pl
( cd doc ; make );
sed -e '/AM_PATH_GTK(/d' \
@ -22,22 +22,23 @@ stdenv.mkDerivation rec {
-e '/AC_OUTPUT/iAM_PROG_AR' -i configure.ac
./mkauto.sh
cd unix
'' + lib.optionalString hostPlatform.isWindows ''
'' + lib.optionalString stdenv.hostPlatform.isWindows ''
cd windows
'';
TOOLPATH = stdenv.cc.targetPrefix;
makefile = if hostPlatform.isWindows then "Makefile.mgw" else null;
makefile = if stdenv.hostPlatform.isWindows then "Makefile.mgw" else null;
installPhase = if hostPlatform.isWindows then ''
installPhase = if stdenv.hostPlatform.isWindows then ''
for exe in *.exe; do
install -D $exe $out/bin/$exe
done
'' else null;
nativeBuildInputs = [ autoconf automake halibut libtool perl pkgconfig ];
buildInputs = []
++ lib.optionals hostPlatform.isUnix [ gtk2 ncurses ];
buildInputs = lib.optionals stdenv.hostPlatform.isUnix [
gtk2 ncurses
];
enableParallelBuilding = true;
meta = with lib; {

View File

@ -4,7 +4,7 @@ let
arch = {
"x86_64-linux" = "x64";
"i686-linux" = "i386";
}.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ];
in stdenv.mkDerivation rec {
@ -16,7 +16,7 @@ in stdenv.mkDerivation rec {
sha256 = {
"x86_64-linux" = "0041axi9carspkfaxvyirfvsa29zz55al01x90nh93nzxvpvywsz";
"i686-linux" = "1ar36lp4f6a1z9i82g3gpak4q4ny09faqxdd59q1pvfzq25ypdhs";
}.${stdenv.system};
}.${stdenv.hostPlatform.system};
};
dontStrip = true; # Don't strip, otherwise patching the rpaths breaks

View File

@ -4,17 +4,17 @@
}:
let
arch = if stdenv.system == "x86_64-linux" then "x64"
else if stdenv.system == "i686-linux" then "x86"
else throw "Spideroak client for: ${stdenv.system} not supported!";
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
else if stdenv.hostPlatform.system == "i686-linux" then "x86"
else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!";
interpreter = if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2"
else if stdenv.system == "i686-linux" then "ld-linux.so.2"
else throw "Spideroak client for: ${stdenv.system} not supported!";
interpreter = if stdenv.hostPlatform.system == "x86_64-linux" then "ld-linux-x86-64.so.2"
else if stdenv.hostPlatform.system == "i686-linux" then "ld-linux.so.2"
else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!";
sha256 = if stdenv.system == "x86_64-linux" then "a88e5a8fe4a565ac500668bd53cf5784752d7c9253304ddce39ee7b01d078533"
else if stdenv.system == "i686-linux" then "668f3b83a974a3877d16c8743c233a427ea0a44ab84b7f9aec19a2995db66c16"
else throw "Spideroak client for: ${stdenv.system} not supported!";
sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "a88e5a8fe4a565ac500668bd53cf5784752d7c9253304ddce39ee7b01d078533"
else if stdenv.hostPlatform.system == "i686-linux" then "668f3b83a974a3877d16c8743c233a427ea0a44ab84b7f9aec19a2995db66c16"
else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!";
ldpath = stdenv.lib.makeLibraryPath [
fontconfig freetype glib libICE libSM

View File

@ -44,13 +44,13 @@ let
] + ":${stdenv.cc.cc.lib}/lib64";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://github.com/johannesjo/super-productivity/releases/download/v${version}/superProductivity_${version}_amd64.deb";
sha256 = "0jfi0lfijnhij9jvkhxgyvq8m1jzaym8n1c7707fv3hjh1h0vxn1";
}
else
throw "super-productivity is not supported on ${stdenv.system}";
throw "super-productivity is not supported on ${stdenv.hostPlatform.system}";
in stdenv.mkDerivation {
name = "super-productivity-${version}";

Some files were not shown because too many files have changed in this diff Show More