Skip to content

Commit

Permalink
treewide: fix evaluation issues
Browse files Browse the repository at this point in the history
Tested with the following:

$ nix-env -qaP -f . --drv-path --out-path --argstr system x86_64-darwin
$ nix-env -qaP -f . --drv-path --out-path --argstr system i686-linux
$ nix-env -qaP -f . --drv-path --out-path --argstr system x86_64-linux
$ nix-env -qaP -f . --drv-path --out-path --argstr system aarch64-linux
  • Loading branch information
matthewbauer committed Aug 7, 2018
1 parent 960a391 commit d2dfec9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ let
plat = {
"i686-linux" = "i386";
"x86_64-linux" = "amd64";
}.${stdenv.system};
}.${stdenv.system} or throw "Wire Desktop for ${stdenv.system} are unavailable";

sha256 = {
"i686-linux" = "071ddh2d8wmiybwafwyb97962zj358l0fq7g2r44231653sgybvq";
"x86_64-linux" = "0qp9ms94smnm7k47b0n0jdzvnm1b7gj25hyinsfc6lghrb6jqw3r";
}.${stdenv.system};
}.${stdenv.system} or throw "Wire Desktop for ${stdenv.system} are unavailable";

in
stdenv.mkDerivation rec {
Expand Down
10 changes: 5 additions & 5 deletions pkgs/os-specific/darwin/apple-sdk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -201,30 +201,30 @@ in rec {
};

overrides = super: {
AppKit = stdenv.lib.overrideDerivation super.AppKit (drv: {
AppKit = super.AppKit.overrideAttrs (drv: {
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [
"/System/Library/PrivateFrameworks/"
];
});

CoreMedia = stdenv.lib.overrideDerivation super.CoreMedia (drv: {
CoreMedia = super.CoreMedia.overrideAttrs (drv: {
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [
"/System/Library/Frameworks/CoreImage.framework"
];
});

CoreMIDI = stdenv.lib.overrideDerivation super.CoreMIDI (drv: {
CoreMIDI = super.CoreMIDI.overrideAttrs (drv: {
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [
"/System/Library/PrivateFrameworks/"
];
setupHook = ./private-frameworks-setup-hook.sh;
});

Security = stdenv.lib.overrideDerivation super.Security (drv: {
Security = super.Security.overrideAttrs (drv: {
setupHook = ./security-setup-hook.sh;
});

QuartzCore = stdenv.lib.overrideDerivation super.QuartzCore (drv: {
QuartzCore = super.QuartzCore.overrideAttrs (drv: {
installPhase = drv.installPhase + ''
f="$out/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h"
substituteInPlace "$f" \
Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/admin/google-cloud-sdk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ let
url = "${baseUrl}/${name}-linux-x86_64.tar.gz";
sha256 = "d39293914b2e969bfe18dd19eb77ba96d283995f8cf1e5d7ba6ac712a3c9479a";
};
}.${system};
}.${system} or throw "Google Cloud SDK binaries for ${system} are unavailable.";

in stdenv.mkDerivation rec {
name = "google-cloud-sdk-${version}";
Expand Down
9 changes: 8 additions & 1 deletion pkgs/top-level/unix-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ let
version = "1003.1-2008";

singleBinary = cmd: providers: let
provider = providers.${hostPlatform.parsed.kernel.name};
provider = providers.${hostPlatform.parsed.kernel.name}
or (throw ''
No provider for ${cmd} available in unix tools for
${hostPlatform.parsed.kernel.name}.
'');

bin = "${getBin provider}/bin/${cmd}";
manpage = "${getOutput "man" provider}/share/man/man1/${cmd}.1.gz";
in runCommand "${cmd}-${version}" {
Expand Down

0 comments on commit d2dfec9

Please sign in to comment.