Commit Graph

12 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
h7x4
41974d5ed9
treewide: add mainProgram 2023-11-27 02:17:53 +01:00
Alyssa Ross
e3e57b8f18 lib.systems: elaborate Rust metadata
We need this stuff to be available in lib so make-derivation.nix can
access it to construct the Meson cross file.

This has a couple of other advantages:

 - It makes Rust less special.  Now figuring out what Rust calls a
   platform is the same as figuring out what Linux or QEMU call it.

 - We can unify the schema used to define Rust targets, and the schema
   used to access those values later.  Just like you can set "config"
   or "system" in a platform definition, and then access those same
   keys on the elaborated platform, you can now set "rustcTarget" in
   your crossSystem, and then access "stdenv.hostPlatform.rustcTarget"
   in your code.

"rustcTarget", "rustcTargetSpec", "cargoShortTarget", and
"cargoEnvVarTarget" have the "rustc" and "cargo" prefixes because
these are not exposed to code by the compiler, and are not
standardized.  The arch/os/etc. variables are all named to match the
forms in the Rust target spec JSON.

The new rust.target-family only takes a list, since we don't need to
worry about backwards compatibility when that name is used.

The old APIs are all still functional with no warning for now, so that
it's possible for external code to use a single API on both 23.05 and
23.11.  We can introduce the warnings once 23.05 is EOL, and make them
hard errors when 23.11 is EOL.
2023-11-09 10:02:24 +01:00
figsoda
7aac62c248 halp: 0.1.6 -> 0.1.7
Diff: https://github.com/orhun/halp/compare/v0.1.6...v0.1.7

Changelog: https://github.com/orhun/halp/blob/v0.1.7/CHANGELOG.md
2023-06-17 13:25:01 -04:00
figsoda
6039e79f2e halp: 0.1.5 -> 0.1.6
Diff: https://github.com/orhun/halp/compare/v0.1.5...v0.1.6

Changelog: https://github.com/orhun/halp/blob/v0.1.6/CHANGELOG.md
2023-04-18 11:19:56 -04:00
figsoda
7e8c4c21fc halp: 0.1.4 -> 0.1.5
Diff: https://github.com/orhun/halp/compare/v0.1.4...v0.1.5

Changelog: https://github.com/orhun/halp/blob/v0.1.5/CHANGELOG.md
2023-04-02 23:10:19 -04:00
figsoda
3f2cd046d5 halp: 0.1.3 -> 0.1.4
Diff: https://github.com/orhun/halp/compare/v0.1.3...v0.1.4

Changelog: https://github.com/orhun/halp/blob/v0.1.4/CHANGELOG.md
2023-03-17 17:20:02 -04:00
figsoda
40647f2216 halp: 0.1.2 -> 0.1.3
Diff: https://github.com/orhun/halp/compare/v0.1.2...v0.1.3

Changelog: https://github.com/orhun/halp/blob/v0.1.3/CHANGELOG.md
2023-03-15 21:38:22 -04:00
figsoda
93da003829 halp: 0.1.1 -> 0.1.2
Diff: https://github.com/orhun/halp/compare/v0.1.1...v0.1.2

Changelog: https://github.com/orhun/halp/blob/v0.1.2/CHANGELOG.md
2023-03-14 11:56:49 -04:00
figsoda
127f702343 halp: 0.1.0 -> 0.1.1
Diff: https://github.com/orhun/halp/compare/v0.1.0...v0.1.1

Changelog: https://github.com/orhun/halp/blob/v0.1.1/CHANGELOG.md
2023-03-13 18:45:45 -04:00
figsoda
ea8fc12427 halp: init at 0.1.0 2023-03-12 17:13:33 -04:00