Commit Graph

29 Commits

Author SHA1 Message Date
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
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
stuebinm
ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00
Artturin
f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
Artturin
6f6cc4a22d treewide: use toString on list NIX_CFLAGS_COMPILE
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
2023-02-22 21:23:04 +02:00
Shawn8901
a59dda942c treewide: remove global with lib; statements in pkgs/development 2023-01-26 18:31:02 +01:00
Artturin
61c3058bcb all-packages.nix: remove inherit (*xorg) *'s
using inherits in callPackage args is discouraged and doesn't splice
correctly
2022-10-14 20:48:09 +03:00
Robert Scott
07706c46ca treewide/development: add sourceType binaryNativeCode for more packages 2022-06-17 19:59:09 +01:00
OPNA2608
d2f268745a treewide: autoPatchelfHook only on Linux 2022-03-23 21:37:39 +01:00
xaverdh
03a257e5a3
treewide: quote urls according to rfc 0045 (#145260)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-11-10 11:37:56 +01:00
Aaron Lindsay
9aae499e79 mspds-bin: init at 3.15.1.1 2021-04-23 09:47:52 -07:00
Aaron Lindsay
da7c1383f4 mspds: init at 3.15.1.1 2021-04-23 09:47:52 -07:00
Ben Siraphob
02ee14b9d5 treewide: stdenvNoCC.lib -> lib 2021-01-27 13:01:51 +07:00
Ben Siraphob
2f78ee7e81 pkgs/development: stdenv.lib -> lib 2021-01-24 00:16:29 +07:00
Profpatsch
4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Aaron Lindsay
5ba76e94ec mspdebug: optional runtime dependency on TI libmsp430 2020-06-01 16:59:58 -07:00
Aaron Lindsay
ceef1d2f27 mspdebug: fix darwin build 2020-06-01 16:53:43 -07:00
Aaron Lindsay
1436bb9968 mspdebug: enableParallelBuilding and minor cleanup 2020-06-01 16:40:54 -07:00
Jan Tojnar
e89e2edc73
libusb-compat-0_1: rename from libusb 2020-04-28 05:33:41 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
volth
c814d72b51 treewide: name -> pname 2019-08-17 10:54:38 +00:00
Aaron Lindsay
3f783d9b8e msp430GccSupport: 1.206 -> 1.207 2019-07-05 23:24:20 +02:00
Aaron Lindsay
6bfdee8107 fixup! mspdebug: init at 0.25 2019-03-26 22:50:05 -07:00
Aaron Lindsay
a4cc81746a fixup! msp430: vendor header package 2019-03-26 22:37:06 -07:00
Aaron Lindsay
9785df65da fixup! msp430: vendor header package 2019-03-26 11:22:23 -07:00
Aaron Lindsay
bc2c8db7f8 mspdebug: init at 0.25 2019-03-26 11:21:02 -07:00
Aaron Lindsay
e3f6b08307 wip: better packaging? 2019-03-25 22:14:41 -07:00
Aaron Lindsay
1c7bb464d9 msp430: include vendor headers with stdenv 2019-03-25 20:39:51 -07:00
Aaron Lindsay
02a1d3b24a msp430: vendor header package 2019-03-25 20:33:58 -07:00