Commit Graph

19 Commits

Author SHA1 Message Date
rnhmjoj
b8b939cdcc fetchfossil: do not use nobody
Set the admin to the current user instead of nobody.

Note: this doesn't seem to affect the output hash.
2026-04-13 10:23:25 +02:00
·𐑑𐑴𐑕𐑑𐑩𐑤
c97c45cda6 nix-prefetch-fossil: add path to JSON output 2026-02-08 01:31:00 +07:00
·𐑑𐑴𐑕𐑑𐑩𐑤
4d03aa4c5d nix-prefetch-fossil: use datetime instead of date like other prefetchers
The common name “date” in prefetch returns was a poor choice.
2026-02-08 01:27:23 +07: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
Wolfgang Walther
cf127c9dc3 treewide: load structured attributes in all bash builders consistently
It's hard to put the sourcing of ./.attrs.sh into all builder
consistently - mistakes will happen. Thus, load structured attrs once in
make-derivation and then source the remaining builder on top.

This should fix quite a few builders with structured attributes in
principle. Most importantly it helps substitute / substituteAll, which
are required for bootstrap on some platforms.
2024-12-29 18:36:47 +01:00
Silvan Mosberger
667d42c00d treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 57b193d8dd
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:27:17 +01:00
nicoo
c3691d772d fetchfossil: simplify and check that multiple hashes were not passed in 2024-09-17 15:00:28 +00:00
Francesco Gazzetta
c034d14c41 fetchfossil: support SRI hashes 2023-11-22 09:47:57 +01:00
Maximilian Bosch
8bc5104a6e treewide: refactor .attrs.sh detection
When specifying the `builder` attribute in `stdenv.mkDerivation`, this
will be effectively transformed into

    builtins.derivation {
      builder = stdenv.shell;
      args = [ "-e" builder ];
    }

This also means that `default-builder.sh` is never sourced and as a
result it's not guaranteed that `$NIX_ATTRS_SH_FILE` is set to a correct
location[1].

Also, we need to source `.attrs.sh` to source `$stdenv`. So, the
following is done now:

* If `$NIX_ATTRS_SH_FILE` points to a correct location, then use it.
  Directly using `.attrs.sh` is problematic for `nix-shell(1)` usage
  (see previous commit for more context), so prefer the environment
  variable if possible.

* Otherwise, if `.attrs.sh` exists, then use it. See [1] for when this
  can happen.

* If neither applies, it can be assumed that `__structuredAttrs` is
  turned off and thus nothing needs to be done.

[1] It's possible that it doesn't exist at all - in case of Nix 2.3 or
    it can point to a wrong location on older Nix versions with a bug in
    `__structuredAttrs`.
2023-10-04 18:36:57 +02:00
Felix Buehler
cdb39a86e0 treewide: use optionalString 2023-02-13 21:52:34 +01:00
Artturin
fe1c7a1945 treewide: remove usages of header and stopNest
they're obsolete
2023-01-16 00:08:12 +02:00
Artturin
c01f509e44 treewide: source .attrs in builders
if theres a source $stdenv then this is needed

for structuredAttrs
2022-12-08 21:09:02 +02:00
Ashish SHUKLA
4eb42a4f1d fetchfossil: Depend on cacert
Without it, it'll not able to verify SSL certificates, rendering
it mostly useless
2020-10-24 16:43:05 +05:30
John Ericson
3d59b4d285 treewide: Fixed output fetch* derivations should use nativeBuildInputs 2018-01-09 20:14:46 -05:00
Corbin
76b74ab2f1 fetchfossil: Don't support MD5.
This effectively means that SHA256 is the only way to go. I'm not really
bothered by this.
2016-08-21 11:53:40 -07:00
Corbin
2d94071cc4 fetchfossil: Require rev.
Otherwise no bumps are done when upstream changes. Not sure how to ping the
repository and check without just doing the clone.
2016-08-19 13:55:10 -07:00
Corbin
7880bc0c21 fetchfossil: Cleanup some copy-and-paste. 2016-08-19 07:34:58 -07:00
Corbin
23a50ca407 fetchfossil: Don't let Fossil write to $out/.fossil. 2016-08-18 23:16:37 -07:00
Corbin
20a0e2e3bf build-support: Add fetchfossil function.
This is a dead-simple fetcher which clones a Fossil repository, opens it
directly into $out, and then nicks out the single Fossil checkout marker.
2016-08-18 22:29:30 -07:00