Commit Graph

30 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
Shadaj Laddad
c29ef94279 sapling: pin to Python 3.11 2024-09-11 07:49:44 -05:00
Shadaj Laddad
860120afe4 sapling: 0.2.202401116 -> 0.2.20240718 2024-07-27 00:21:15 -05:00
Sigmanificient
2ee703dccb pkgs/applications: remove unused arguments 2024-07-26 11:36:49 +02: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
Sandro Jäckel
fb0d661081
treewide: replace prefetch-yarn-deps with fixup-yarn-lock where necessary 2024-04-17 13:34:05 -04:00
Matthew "strager" Glazar
a6f96f04c8 sapling: 0.2.20231113-145254 -> 0.2.20240116-133042 2024-01-20 11:25:51 -06:00
Felix Buehler
644b234e1c sapling: migrate to prefetch-yarn-deps 2023-11-24 15:05:00 -06:00
Matthew "strager" Glazar
d6400c8a2a sapling: 0.2.20230523-092610 -> 0.2.20231113-145254
The build for Sapling's isl package has changed:

* Instead of being a bunch of .js files installed along-side the main
  executable, isl is now one isl-dist.tar.xz file extracted at
  run-time by the 'sl web' command.

* To configure the 'node' executable used by 'sl web', set the
  web.node-path Sapling setting by changing the default configs
  embedded in the sl executable.
2023-11-16 15:40:53 -06:00
Matthew "strager" Glazar
97ebbdef91 sapling: teach gen-deps.py script to update Cargo.lock
Upstream Sapling does not maintain a Cargo.lock file, so Nixpkgs has its
own. Teach the gen-deps.py script to update Nixpkgs' Cargo.lock whenever
the Cargo.toml files change.
2023-08-21 17:09:39 -05:00
Jan Malakhovski
5852f26bdc treewide: noop: refer to src.name or similar in sourceRoot where appropriate, part 1: trivial cases 2023-08-03 16:32:03 +00:00
Felix Buehler
f3719756b5 treewide: use optionalString instead of 'then ""' 2023-06-24 20:19:19 +02:00
Matthew "strager" Glazar
8dd2bd3f76 sapling: 0.2.20230426-145232+7ea1f245 -> 0.2.20230523-092610+f12b7eee 2023-05-24 20:26:00 -05:00
Alyssa Ross
5e06b3cb19 treewide: don't use rustPlatform.rust
This will be deprecated in the next commit.
2023-05-12 15:31:21 +00:00
Matthew "strager" Glazar
1633b20a5e sapling: 0.2.20230228-144002-h9440b05e -> 0.2.20230426-145232+7ea1f245 2023-04-29 14:53:53 -07:00
Matthew "strager" Glazar
05a26cee27 sapling: 0.2.20230228-144002-h9440b05e -> 0.2.20230330-193452-h69692651 2023-04-16 17:24:27 -05:00
Matthew "strager" Glazar
c60afb9cbe sapling: fix build
Nixpkgs commit 451c6321 upgraded setuptools from version 65.0.3 to
version 67.4.0. This upgrade introduced a breaking change in
setuptools [1] which causes the Sapling package's build to fail:

    setuptools.extern.packaging.version.InvalidVersion: Invalid version: '0.2.20230124-180750-hf8cd450a'

This is an upstream issue [2]. For now, work around this issue in
Nixpkgs by truncating Sapling's version number.

Before 451c6321:

    $ nix-env -q sapling
    sapling-0.2.20230228-144002-h9440b05e

    $ sl --version
    Sapling 0.2.20230228-144002-h9440b05e

After this patch:

    $ nix-env -q sapling
    sapling-0.2.20230228-144002-h9440b05e

    $ sl --version
    Sapling 0.2.20230228

Refs: 451c632147

[1] be6c0218bc/CHANGES.rst (v6600)
[2] https://github.com/facebook/sapling/issues/571
2023-03-18 15:17:53 -05:00
Matthew "strager" Glazar
a479ff1ec5 sapling: 0.2.20230124-180750-hf8cd450a -> 0.2.20230228-144002-h9440b05e 2023-03-06 12:47:10 -06:00
Matthew "strager" Glazar
e8b67bd87c sapling: 0.2.20221222-152408-ha6a66d09 -> 0.2.20230124-180750-hf8cd450a 2023-02-13 01:16:17 -06:00
Matthew "strager" Glazar
af57670e59 sapling: remove intermediate package
The build for the sapling package happens in three steps:

1. build sapling-isl
2. build sapling-main, copying files from sapling-isl
3. build sapling, copying files from sapling-main

I don't see a reason for splitting sapling-main and sapling. The problem
with splitting is that it makes it hard to use a package override to
patch sapling-main.

Merge sapling-main and sapling so I can easily apply patches with my
nixpkgs/config.nix.
2023-02-12 14:16:32 -06:00
Matthew "strager" Glazar
7875a11bd6 sapling: use latest Python
After upgrading to Sapling 0.2.20221222-152408-ha6a66d09, we no longer
need a specific version of Python. Use the Nixpkgs default.
2023-01-14 19:55:17 -06:00
Matthew "strager" Glazar
8ed32c567e sapling: 0.1.20221118-210929-cfbb68aa -> 0.2.20221222-152408-ha6a66d09 2023-01-14 11:32:44 -06:00
Austin Seipp
c847a43b67 sapling: fix nodejs path, add enableMinimal option
This change fixes the path to 'nodejs' in the Sapling scripts, so that
the 'sl web' command works OOTB even if the user has a fresh `$PATH`
without node itself.

However, this is really a developer-only tool, and isn't needed just to
e.g. clone repositories. In particular, a 'fetchSapling' codepath would
not need it; therefore we make it optional, but turned on by default.
The intention is to have a 'saplingMinimal' expression which can be used
for that path.

NOTE: this does NOT add a 'saplingMinimal' expression to
all-packages.nix; that would just result in more Hydra churn, so we
avoid it for now.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2022-12-09 18:26:22 -06:00
Austin Seipp
21e7ab0afc sapling: fix 'sl web' command
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2022-12-09 18:26:22 -06:00
Austin Seipp
37f2a530e1 sapling: fix curl in buildInputs on darwin
It's needed on Darwin, but not Linux, so this is a bit more accurate.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2022-12-09 18:26:22 -06:00
Jade Lovelace
6065d768e1 sapling: fix on macOS
There were two factors here: our cargo hook was messing up the cargo
config, which broke the build, and also an upstream bug where Sapling
didn't work on Python 3.10.

The upstream issue was filed as https://github.com/facebook/sapling/issues/279

We can get rid of the python 3.8 override as soon as this patch gets
into a released version.
2022-12-01 10:12:43 -06:00
Austin Seipp
8d7badd689 sapling: add a simple checkPhase
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2022-11-25 00:33:19 -06:00
Austin Seipp
c110260568 sapling: set LOCALE_ARCHIVE properly
Without this, `sl` simply fails on any non-NixOS machine with an
immediate failure, as it can't set the locale properly.

As usual, this can be fixed by setting LOCALE_ARCHIVE for glibc
explicitly. With this, `sl` works out of the box on NixOS and non-NixOS
machines.

Also add myself as a maintainer.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2022-11-25 00:33:19 -06:00
Daniel Nagy
aab14dc769 sapling: simplify dependency generation script 2022-11-24 14:14:20 -06:00
Pierce Bartine
47dfc53fea
sapling: init at 0.1.20221118-210929-cfbb68aa (#201798) 2022-11-24 00:58:03 -06:00