mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
parent
1174fd6678
commit
40799fc06d
@ -637,7 +637,7 @@ Names of files and directories should be in lowercase, with dashes between words
|
|||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
buildInputs = lib.optional stdenv.isDarwin iconv;
|
buildInputs = lib.optional stdenv.hostPlatform.isDarwin iconv;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -645,7 +645,7 @@ Names of files and directories should be in lowercase, with dashes between words
|
|||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
buildInputs = if stdenv.isDarwin then [ iconv ] else null;
|
buildInputs = if stdenv.hostPlatform.isDarwin then [ iconv ] else null;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -349,8 +349,8 @@ let
|
|||||||
nodePackages.prettier
|
nodePackages.prettier
|
||||||
];
|
];
|
||||||
|
|
||||||
inputs = basePackages ++ lib.optionals stdenv.isLinux [ inotify-tools ]
|
inputs = basePackages ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ]
|
||||||
++ lib.optionals stdenv.isDarwin
|
++ lib.optionals stdenv.hostPlatform.isDarwin
|
||||||
(with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]);
|
(with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]);
|
||||||
|
|
||||||
# define shell startup command
|
# define shell startup command
|
||||||
|
@ -84,7 +84,7 @@ One advantage is that when `pkgs.zlib` is updated, it will automatically update
|
|||||||
echo "================= /testing zlib using node ================="
|
echo "================= /testing zlib using node ================="
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postPatch = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
|
postPatch = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin ''
|
||||||
substituteInPlace configure \
|
substituteInPlace configure \
|
||||||
--replace-fail '/usr/bin/libtool' 'ar' \
|
--replace-fail '/usr/bin/libtool' 'ar' \
|
||||||
--replace-fail 'AR="libtool"' 'AR="ar"' \
|
--replace-fail 'AR="libtool"' 'AR="ar"' \
|
||||||
|
@ -125,8 +125,8 @@ On Darwin, if a script has too many `-Idir` flags in its first line (its “sheb
|
|||||||
hash = "sha256-vOhB/FwQMC8PPvdnjDvxRpU6jAZcC6GMQfc0AH4uwKg=";
|
hash = "sha256-vOhB/FwQMC8PPvdnjDvxRpU6jAZcC6GMQfc0AH4uwKg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
|
nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang;
|
||||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
shortenPerlShebang $out/bin/exiftool
|
shortenPerlShebang $out/bin/exiftool
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -1306,7 +1306,7 @@ for example:
|
|||||||
] ++ lib.optionals (pythonAtLeast "3.8") [
|
] ++ lib.optionals (pythonAtLeast "3.8") [
|
||||||
# broken due to python3.8 async changes
|
# broken due to python3.8 async changes
|
||||||
"async"
|
"async"
|
||||||
] ++ lib.optionals stdenv.isDarwin [
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
# can fail when building with other packages
|
# can fail when building with other packages
|
||||||
"socket"
|
"socket"
|
||||||
];
|
];
|
||||||
|
@ -22,7 +22,7 @@ Some common issues when packaging software for Darwin:
|
|||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "libfoo-1.2.3";
|
name = "libfoo-1.2.3";
|
||||||
# ...
|
# ...
|
||||||
makeFlags = lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib";
|
makeFlags = lib.optional stdenv.hostPlatform.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib";
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ cat > $SCRIPT_DIR/default.nix << EOF
|
|||||||
|
|
||||||
callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ])
|
callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ])
|
||||||
(
|
(
|
||||||
if stdenv.isAarch64 then
|
if stdenv.hostPlatform.isAarch64 then
|
||||||
rec {
|
rec {
|
||||||
pname = "brave";
|
pname = "brave";
|
||||||
version = "${latestVersionAarch64}";
|
version = "${latestVersionAarch64}";
|
||||||
@ -31,7 +31,7 @@ callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ])
|
|||||||
hash = "${hashAarch64}";
|
hash = "${hashAarch64}";
|
||||||
platform = "aarch64-linux";
|
platform = "aarch64-linux";
|
||||||
}
|
}
|
||||||
else if stdenv.isx86_64 then
|
else if stdenv.hostPlatform.isx86_64 then
|
||||||
rec {
|
rec {
|
||||||
pname = "brave";
|
pname = "brave";
|
||||||
version = "${latestVersionAmd64}";
|
version = "${latestVersionAmd64}";
|
||||||
|
Loading…
Reference in New Issue
Block a user