npins: set more attributes on injected inputs #1

Open
opened 2025-11-27 18:06:41 +01:00 by goldstein · 0 comments
Owner

we currently only set outPath and rev for tarball inputs (including GitHub inputs) in npins backend

Nix is documented to set rev, revCount, lastModifiedDate, lastModified and narHash and actually also sets inputs, outputs and sourceInfo.

it’s unclear how widespread this is (please leave a comment if you’ve seen any of these used!)

we can set everything properly when npins uses builtins.fetchGit, but fetchTarball unfortunately just doesn’t provide enough information. barring doing something weird like monkey-patching builtins before importing npins/default.nix (is it even possible?), it’s unclear how to progress here

we could also use git fetcher for GitHub, but that loses performance

we currently only set `outPath` and `rev` for tarball inputs (including GitHub inputs) in npins backend Nix is [documented](https://nix.dev/manual/nix/2.28/command-ref/new-cli/nix3-flake.html#flake-format) to set `rev`, `revCount`, `lastModifiedDate`, `lastModified` and `narHash` and [actually](https://git.lix.systems/lix-project/lix/src/commit/27a94369a9a76c7e41220060b85b984e3dc6da4e/lix/libexpr/flake/call-flake.nix#L54-L62) also sets `inputs`, `outputs` and `sourceInfo`. it’s unclear how widespread this is (please leave a comment if you’ve seen any of these used!) we can set everything properly when npins uses `builtins.fetchGit`, but `fetchTarball` unfortunately just doesn’t provide enough information. barring doing something weird like monkey-patching `builtins` before importing `npins/default.nix` (is it even possible?), it’s unclear how to progress here we could also use git fetcher for GitHub, but that loses performance
goldstein changed title from set more attributes on injected inputs for npins backend to npins: set more attributes on injected inputs 2025-11-27 18:14:34 +01:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
goldstein/unflake#1
No description provided.