Commit Graph

52 Commits

Author SHA1 Message Date
Sandro Jäckel
90d0658590 nix-prefetch-git: use normal git 2026-02-24 15:04:15 +01:00
jopejoe1
58c1ec779f treewide: replace lib.trivial.version with lib.trivial.release 2026-02-16 09:45:06 +01:00
Jacek Galowicz
11e3df53c7 nix-prefetch-fossil: fixups (#488059) 2026-02-12 14:20:30 +00:00
Hythera
c6a0d8cbfe nix-prefetch-*: fix binary name 2026-02-08 14:39:01 +01:00
·𐑑𐑴𐑕𐑑𐑩𐑤
1a03b108dc nix-prefetch-fossil: add missing dependencies 2026-02-08 01:33:54 +07:00
Hythera
93d623ed0d nix-prefetch-*: set pname and version 2026-02-06 17:11:24 +01:00
Ben Siraphob
71c3187076 nix-prefetch-scripts: add nix-prefetch-fossil
Add a nix-prefetch-fossil script that follows the same pattern as the
existing nix-prefetch-git, nix-prefetch-hg, etc. scripts. This allows
users to easily fetch Fossil repositories and calculate their hashes
for use with fetchfossil in Nix expressions.

The script supports:
- Fetching from Fossil repository URLs
- Specifying revisions (defaults to "trunk")
- Checking expected hashes
- JSON output compatible with other nix-prefetch scripts
2026-02-05 22:24:55 -05:00
Sandro
35aa794e29 nix-prefetch-script: explicit GNU util usage (#470357) 2025-12-13 16:26:47 +00:00
·𐑑𐑴𐑕𐑑𐑩𐑤
9338b5aa3e nix-prefetch-svn: add missing gnugrep input 2025-12-13 14:32:04 +07:00
·𐑑𐑴𐑕𐑑𐑩𐑤
f5d87c57fc nix-prefetch-scripts: drop gnused as a hard dependency 2025-12-13 12:35:10 +07:00
Sandro Jäckel
af254e78b4 nix-prefetch-scripts: use bash without readline
We don't need that here and it reduces closure size.
2025-12-13 01:08:45 +01:00
Ihar Hrachyshka
567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00
·𐑑𐑴𐑕𐑑𐑩𐑤
f3fae3b4d7 nix-prefetch-darcs: show date 2025-11-26 00:51:44 +07:00
·𐑑𐑴𐑕𐑑𐑩𐑤
e4c95117d9 nix-prefetch-pijul: always show the state
As Pijul’s stable reference, downstream scripts *will* wish to have
access to this value.
2025-11-25 17:46:22 +07:00
Silvan Mosberger
bc76734d04 nix-prefetch-git: Depend on gitMinimal instead of git (#425114) 2025-09-17 12:36:21 +00:00
·𐑑𐑴𐑕𐑑𐑩𐑤
3cb4298339 nix-prefetch-darcs: init 2025-09-10 17:51:09 +07:00
·𐑑𐑴𐑕𐑑𐑩𐑤
38ccce5660 nix-prefetch-pijul: init 2025-08-09 23:38:15 +07:00
Johan Herland
1b97951cb7 nix-prefetch-git: Depend on gitMinimal instead of git
This reduces the transitive closure size of nix-prefetch-git from ~355MB
to ~163MB.
2025-07-14 14:33:40 +00:00
Peder Bergebakken Sundt
ca84c3ff90 nix-prefetch-scripts: set meta.mainProgram 2025-04-17 16:27:16 +02:00
K900
16c5b797a9 nix-prefetch-scripts: just don't depend on Nix
If we're running it from a build (fetchgit, fetchCargoVendor, etc),
none of the code paths that actually call Nix are hit.

If we're _not_ running it from a build, the user can reasonably be expected
to have a Nix present ambiently.

This avoids pulling Nix into the build closure of fetchCargoVendor,
and thus causing infrecs when Nix depends on Rust things.
2025-04-02 10:34:00 +03:00
Silvan Mosberger
374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Rebecca Turner
f4d32e0200 nixForLinking: init
Overlays for CppNix nightly, Lix, or Tvix want to change the default Nix
implementation in Nixpkgs by overriding `pkgs.nix`. However, some
packages link against the internal/unstable CppNix APIs directly, and
these packages will break if built with different versions or
implementations of Nix.

If you want to swap out the Nix implementation in your package set, you
don't want these packages to break. Therefore, some packages will refer
to `nixForLinking` explicitly, at least until these dependencies can be
sorted out.

The addition of an explicit `nixForLinking` attribute decoupled from
`nix`, which is just "a Nix implementation", will help Nix
implementation maintainers test Nix implementations in Nixpkgs with
minimal hassle.
2025-02-27 09:44:32 -08:00
Jörg Thalheim
3dc8ff155b build-support: fix nix-prefetch-* on macOS (#358685) 2024-12-13 14:23:56 +01:00
FliegendeWurst
1b52efe8c2 nix-prefetch-scripts: add bash to inputs
These scripts depend on bash via /bin/sh or /usr/bin/env bash.

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2024-12-09 14:35:26 +01:00
Jonathan del Strother
6cb8c5ec01 build-support: Simplify tmpdir creation with coreutils
macOS 10.12 doesn't have a usable --tmpdir flag on the builtin mktemp, but we can
make use of coreutil's mktemp instead.
2024-11-25 09:41:02 +00:00
Bjørn Forsman
2d2d5ce304 nix-prefetch-git: add git-lfs dependency
Or else using `nix-prefetch-git --fetch-lfs` results in failure, unless
the user manually extends $PATH before calling nix-prefetch-git (which
is bad UX).
2021-08-28 10:14:48 +02:00
Sandro Jäckel
a9743d1b58 nix-prefetch-scripts: cleanup 2021-03-05 16:30:29 +01:00
Ben Siraphob
8c5d37129f pkgs/tools: stdenv.lib -> lib 2021-01-15 17:12:36 +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
rnhmjoj
aee614c996 treewide: replace bazaar with breezy 2020-05-25 09:22:54 +02:00
Andreas Rammhold
b9f176a719 nix-prefetch-git: add gawk to PATH
The prefetch script requires awk to be in PATH and fails otherwise.

Fixes #79968
2020-02-13 16:18:54 +01:00
worldofpeace
3f4a353737 treewide: use dontUnpack 2019-07-01 04:23:51 -04:00
Domen Kožar
66d6e847bb nix-prefetch-git: needs findutils as it depends on find/xargs 2018-09-03 13:23:16 +01:00
volth
52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
Ben Gamari
2b04cddf7e nix-prefetch-scripts: makeWrapper is a nativeBuildInput 2018-01-22 20:25:45 -05:00
Robin Gloster
28cc2642f0 treewide: use less phases if not necessary
This removes some skipping of e.g. fixupPhase and cleans up occurences
where this led to duplicating code
2017-08-11 11:40:36 +02:00
Robin Gloster
c00a95be63 nix-prefetch-git: fix wrapProgram call 2017-08-08 21:45:46 +02:00
Eelco Dolstra
97fc806a7b nix-prefetch-zip: Remove
This script is not needed anymore since "nix-prefetch-url --unpack
<url>" and "nix-prefetch-url -A foo.src" (where "foo.src" is a
fetchzip / fetchFromGitHub call) work fine.
2017-02-16 11:28:23 +01:00
Tuomas Tynkkynen
d359ce90e8 nix-prefetch-scripts: Use correct output of 'nix' 2016-05-14 21:10:23 +03:00
Vladimír Čunát
09af15654f Merge master into closure-size
The kde-5 stuff still didn't merge well.
I hand-fixed what I saw, but there may be more problems.
2016-03-08 09:58:19 +01:00
Valérian Galliat
269d0864b5 nix-prefetch-scripts: explicitly depend on Nix
Otherwise, a call to, for example, nix-prefetch-git, in a nix-shell --pure or
nix-build phase would result in an error such as:

    Switched to a new branch 'fetchgit'
    removing `.git'...
    /nix/store/7qvjji7kbd033nsyxlpiiiam61a44yz9-nix-prefetch-git/bin/.nix-prefetch-git-wrapped: line 374: nix-hash: command not found
2016-02-29 18:38:59 -05:00
Luca Bruno
5b0352a6a4 Merge branch 'master' into closure-size 2015-12-11 18:31:00 +01:00
Tuomas Tynkkynen
c47910ae4e nix-prefetch-scripts: Split into multiple derivations
This makes it possible to e.g. only install nix-prefetch-git and not the
others.

Closes #7399.
2015-12-04 14:38:41 +02:00
Luca Bruno
a412927924 Merge remote-tracking branch 'origin/master' into closure-size 2015-11-25 21:37:30 +01:00
zimbatm
76bf9c54ea nix-prefetch-git: add missing coreutils dependency
At runtime, `readlink` is a dependency
2015-11-16 11:54:43 +01:00
Tuomas Tynkkynen
c471cb866f subversion: Split into multiple outputs 2015-10-28 10:22:59 +01:00
Tuomas Tynkkynen
bff9b546e4 nix-prefetch-scripts: Reference correct output of curl 2015-10-28 10:17:12 +01:00
Charles Strahan
54f3b50131 prefetch-scripts: improve purity
Set HOME to /homeless-shelter to prevent things like git hooks from
running

Closes #5777
2015-01-14 21:28:14 -05:00
Charles Strahan
9bd8dffd77 require gnused for all prefetch scripts 2014-06-23 01:25:40 -04:00
Charles Strahan
400b94e120 fix bzr prefetcher on darwin 2014-06-22 05:07:09 -04:00