fix: stop committing manifest.lock so nixpkgs can package t3#22
Closed
limeytexan wants to merge 1 commit into
Closed
fix: stop committing manifest.lock so nixpkgs can package t3#22limeytexan wants to merge 1 commit into
limeytexan wants to merge 1 commit into
Conversation
The flox lockfile (.flox/env/manifest.lock) embeds absolute /nix/store paths
(e.g. the resolved glibc output). nixpkgs fetches this repository's source as a
fixed-output derivation, and an FOD must not reference store paths, so a
committed lock makes the nixpkgs t3 package fail to build:
error: fixed-output derivations must not reference store paths:
'...-source.drv' references 2 distinct paths, e.g.
'/nix/store/...-glibc-2.42-61'
Remove the committed lock and add it to .flox/.gitignore. flox regenerates it
locally from manifest.toml on activate/build, so local development and
`flox build` are unaffected; the source tarball nixpkgs fetches no longer
contains any /nix/store references.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
Elected to instead filter out diff --git a/pkgs/by-name/t3/t3/package.nix b/pkgs/by-name/t3/t3/package.nix
index 2017c0d57287..b00b6cdede6d 100644
--- a/pkgs/by-name/t3/t3/package.nix
+++ b/pkgs/by-name/t3/t3/package.nix
@@ -8,13 +8,14 @@
stdenv.mkDerivation (finalAttrs: {
pname = "t3";
- version = "1.0.9";
+ version = "1.1.0";
src = fetchFromGitHub {
owner = "flox";
repo = "t3";
tag = "v${finalAttrs.version}";
- hash = "sha256-42T0qQ3zK1jTRU+gcBzEet5rHZ6QuknCbPdbGPNlETI=";
+ hash = "sha256-49nmFvyA5HtX0rTqG4vrCdQPo78HMF7wIN4StItShB4=";
+ postFetch = "rm -f $out/.flox/env/manifest.lock";
};
makeFlags = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
nixpkgs packages
t3by fetching this repository's source as a fixed-output derivation (thefetchFromGitHub/tarball source). An FOD is forbidden from referencing/nix/storepaths — but the committed flox lockfile,.flox/env/manifest.lock, embeds absolute store paths (the resolvedglibcoutput and others, 94 references in total). So building the nixpkgst3package fails:The store paths entered the lock when
glibcwas added toruntime-packages(#21), but any committed lock is fundamentally incompatible with being fetched as an FOD source, because the lock format records resolved store paths.Fix
git rm .flox/env/manifest.lockenv/manifest.lockto.flox/.gitignoreflox regenerates the lock locally from
manifest.tomlonflox activate/flox build, so local development,flox build t3, andflox build nixpkgs-t3are unaffected. The source tarball nixpkgs fetches simply no longer contains the lock — and therefore no/nix/storereferences.Verification (macOS)
flox build t3— passes (regenerates the lock locally frommanifest.toml).flox build nixpkgs-t3— passes.git statusis clean after aflox activate, andgit check-ignorematches it.git archive HEAD | tar -xO | grep -c /nix/store→ 0 (the produced source archive contains no store paths and nomanifest.lock), which is the exact condition the FOD requires.Trade-off
The committed lock previously pinned exact package revisions for reproducible flox builds. Removing it means
flox buildresolves against the catalog at build time rather than a checked-in pin. This is the necessary cost of being packageable by nixpkgs from source; the alternative (keeping a committed lock) cannot satisfy the FOD no-store-paths rule.🤖 Generated with Claude Code