Commit Graph

51 Commits

Author SHA1 Message Date
piegames
68927918d0 treewide: Fix indentation in strings
The indentation stripping semantics of strings are fairly bad and have a
few gotchas where the resulting string has not the intended indentation.
This commit fixes most if not all such instances in Nixpkgs.

I tried to strive a balance between keeping the diff small and
reformatting/refactoring the code to look better. In general,
reformatting should be left to Nixfmt.

Note that this causes a lot of rebuilds by design. All changes need to
be thoroughly vetted and reviewed for correctness. There is no automatic
way to prove correctness.

List of files to fix generated by running
https://gerrit.lix.systems/c/lix/+/2092 on Nixpkgs and looking at the
warnings.
2024-10-22 21:36:42 +02:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Siddarth Kumar
15d5ce3687
xcodeenv: accept version & perform runtime checks
- xcodewrapper nix derivation has been updated to now accept a list of acceptable versions.
- allowHigher is now removed
- this matches closely to what we use for building react-native with nix at status-mobile repo
ref -> https://github.com/status-im/status-mobile/blob/develop/nix/pkgs/xcodeenv/compose-xcodewrapper.nix
- The key change done here is that now xcodewrapper checks Xcode versions at runtime instead of build time. This helps us to show warning messages when underlying environment does not have the Xcode version we want to support.
2024-09-12 20:43:05 +05:30
Jakub Sokołowski
8fd4097529
xcodeenv: use __noChroot to avoid permission errors
When `sandbox=relaxed` is used this derivation fails with:
```
> /nix/store/yyy-stdenv-darwin/setup: line 1391: /nix/store/xxx-xcode-wrapper-14.3/bin/xcodebuild: Operation not permitted
> We require xcodebuild version: 14.3
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-03 11:22:20 +02:00
Jakub Sokołowski
ae08ff7b71
xcodeenv: allow versions higher than specified
Add `allowHigher` option to let higher versions of Xcode.
This is useful when xcodeenv is used for `nix-shell` for developers
and their xcode version might be a bit newer than required one.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-04-06 19:20:56 +02:00
Felix Buehler
cdb39a86e0 treewide: use optionalString 2023-02-13 21:52:34 +01:00
Artturin
05a2dfd674 lib.replaceChars: warn about being a deprecated alias
replaceStrings has been in nix since 2015(nix 1.10)

so it is safe to remove the fallback

d6d5885c15
2022-12-15 22:25:51 +02:00
Pavol Rusnak
c3bbfb77ad
pkgs/development/mobile: stdenv.lib -> lib 2021-01-21 20:45:23 +01:00
zowoq
932941b79c treewide: editorconfig fixes
- remove trailing whitespace
- use spaces for indentation
2021-01-21 13:29:54 +10:00
Sander van der Burg
9b51c5145a xcodeenv: bump default Xcode version to 11.1, default iOS SDK to 13.1. Add troubleshooting section to docs 2019-11-11 00:18:22 +01:00
Sander van der Burg
907c478ceb titaniumenv: fix stripping the unneeded architectures 2019-03-10 23:18:08 +01:00
Sander van der Burg
f3294b93ec xcodeenv: fix generation of ad-hoc wireless installation page 2019-02-21 21:42:05 +01:00
Sander van der Burg
b72070959a xcodeenv: do not rename bundleId to lowercase 2019-02-21 21:17:15 +01:00
Sander van der Burg
9edc2d4dbb xcodeenv: enable Xcode 10.1 support 2019-02-04 22:43:48 +01:00
Sander van der Burg
907216a57d Replace xcodeenv with new implementation 2018-12-18 21:16:06 +01:00
Lionello Lunesu
132ed23f35
xcodeenv.buildApp: inherit meta
Without `inherit meta;` there was no easy way for XCode packages to
set meta information of the final derivation.
2018-10-02 12:01:22 +08:00
Alexandre Esteves
85b5fc7c98 xcodeenv: fix typo 2018-05-06 21:34:05 +00:00
Sander van der Burg
112ebed491 xcodeenv: publish xcarchive directory in the output store path if requested 2018-03-22 15:02:09 +01:00
Sander van der Burg
f2bd9d4745 xcodeenv: replace deprecated package application procedure by the new export archive operation 2018-03-22 14:33:15 +01:00
Sander van der Burg
61a7f0bbf0 xcodeenv: use 9.2 by default 2018-01-05 11:47:30 +01:00
Sander van der Burg
62f7fc8c19 xcodebuild: fix to make it build against the 11.2 iphone SDK 2018-01-05 11:40:34 +01:00
Sander van der Burg
b81001188c xcodeenv, titaniumenv: fix IPA builds by granting codesign the right permissions 2017-01-27 10:50:36 +01:00
Sander van der Burg
0f6eab52e1 xcodeenv: make it work with Xcode 8.2.1 2017-01-25 16:56:55 +01:00
Sander van der Burg
b6d84748b9 xcodeenv: make it work with xcode 7.2 2016-01-07 14:43:17 +00:00
Sander van der Burg
53a4002bbc xcodeenv: make version 6.1.1 the default 2015-01-22 15:36:58 +00:00
Sander van der Burg
8436f4d871 xcodeenv: make the login keychain the default, before the generated keychain gets discarded. Otherwise, the keychain becomes corrupt 2014-10-27 17:24:35 +01:00
Sander van der Burg
f58b563cb6 xcodeenv: Reimplement simulator script to work with Xcode 6 2014-10-15 17:10:35 +02:00
Sander van der Burg
fa99c0d0b1 xcodeenv: make version 6.0.1 the default 2014-10-14 00:27:23 +02:00
Sander van der Burg
470007e7e1 Make path to Xcode configurable 2014-10-02 15:49:33 +02:00
Peter Simons
2d326e5032 Merge remote-tracking branch 'origin/master' into staging.
Conflicts:
	pkgs/desktops/e18/enlightenment.nix
2014-08-04 16:51:47 +02:00
Sander van der Burg
bffdf03e4f Support app names with white spaces 2014-08-04 11:23:55 +02:00
Sander van der Burg
b0769d8db1 Use hyperlink and click action instead of meta refresh 2014-08-01 19:26:34 +02:00
Sander van der Burg
5a918f5f5c Add experimental link to proxy to page that does wireless distributions of IPA files 2014-08-01 18:34:18 +02:00
Eelco Dolstra
7f410ef923 Merge remote-tracking branch 'origin/master' into staging
Conflicts:
	pkgs/misc/vim-plugins/default.nix
2014-07-22 11:00:00 +02:00
Sander van der Burg
d3d3120052 Support UUIDs in lowercase 2014-07-18 16:40:15 +02:00
Eelco Dolstra
40f7b0f9df Another attempt to eradicate ensureDir
See c556a6ea46.
2014-06-30 14:56:10 +02:00
Sander van der Burg
8faebb5323 Make iphone SDK 7.0 the default 2014-01-15 21:52:43 +01:00
Sander van der Burg
2f624cd1fa Make xcode detection a bit more robust and configurable 2013-12-24 14:34:56 +01:00
Sander van der Burg
f24e20f1e3 Support Xcode 5.0 2013-10-15 16:32:38 +02:00
Sander van der Burg
bf1c37494e Moved reference to iPhone SDKs to the wrapper that proxies to Xcode 2013-08-16 13:20:59 +02:00
Sander van der Burg
a82fcea437 Make iPhone simulator SDKs configurable 2013-08-05 12:47:57 +02:00
Sander van der Burg
41932dd135 Do not make assumptions on the scheme name, but let xcodebuild decide about it 2013-07-15 11:32:12 +02:00
Sander van der Burg
a2b8fb3776 It's impossible to guess the name so we add an extra optional parameter to override it 2013-05-29 15:01:55 +02:00
Sander van der Burg
a7895de1fc Use double quotes to expand wildcards 2013-05-29 14:50:24 +02:00
Sander van der Burg
cf512cf5c2 Use wildcard for the appname 2013-05-29 14:18:35 +02:00
Sander van der Burg
647bca444c Allow appnames with spaces everywhere 2013-03-21 14:11:58 +01:00
Sander van der Burg
eacb6c1506 xcodeenv: Add IPA file to Hydra build products 2013-03-15 16:18:45 +01:00
Sander van der Burg
15e1daf0c3 Make iOS SDK version configurable 2013-03-13 13:02:19 +01:00
Sander van der Burg
9ec69c077e Make xcode version configurable 2013-03-12 17:23:03 +01:00
Sander van der Burg
5d6ffdb623 xcodeenv: Allow app names with with spaces in them 2013-02-12 11:35:21 +01:00