From 54277f49a0a74b8ca4ba83817fb065afa11dcb72 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 13 Sep 2024 15:08:08 +0200 Subject: [PATCH 1/4] Update flake-schemas to 0.1.5 --- src/mixed-flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mixed-flake.nix b/src/mixed-flake.nix index c80365e..9abd4df 100644 --- a/src/mixed-flake.nix +++ b/src/mixed-flake.nix @@ -26,7 +26,7 @@ allSchemas = (flake.outputs.schemas or defaultSchemas) // schemaOverrides; # FIXME: make this configurable - defaultSchemas = (builtins.getFlake "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.3/0190b841-54d3-7b7a-8550-24942bc38caf/source.tar.gz?narHash=sha256-c2AZH9cOnSpPXV8Lwy19/I8EgW7G%2BE%2BZh6YQBZZwzxI%3D").schemas; + defaultSchemas = (builtins.getFlake "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz?narHash=sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw%3D").schemas; # Ignore legacyPackages for now, since it's very big and throws uncatchable errors. schemaOverrides.legacyPackages = { From ae9479e6dffb778b51c65f083155fdcd3cd06f63 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 13 Sep 2024 15:12:40 +0200 Subject: [PATCH 2/4] Move file --- src/{mixed-flake.nix => flake-contents/flake.nix} | 0 src/flake_info.rs | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/{mixed-flake.nix => flake-contents/flake.nix} (100%) diff --git a/src/mixed-flake.nix b/src/flake-contents/flake.nix similarity index 100% rename from src/mixed-flake.nix rename to src/flake-contents/flake.nix diff --git a/src/flake_info.rs b/src/flake_info.rs index 2a61402..bd74f9f 100644 --- a/src/flake_info.rs +++ b/src/flake_info.rs @@ -257,7 +257,7 @@ impl FlakeMetadata { // error: path '/tmp' is a symlink let tempdir_path = tempdir.path().canonicalize()?; - let flake_contents = include_str!("mixed-flake.nix") + let flake_contents = include_str!("flake-contents/flake.nix") .replace( FLAKE_URL_PLACEHOLDER_UUID, &self.flake_locked_url.escape_default().to_string(), From 55761e72515c4ef194259ec7526b96c3930eab27 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 13 Sep 2024 15:48:17 +0200 Subject: [PATCH 3/4] Handle derivation 'outputs' attribute being unset Fixes #162. --- src/flake-contents/flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flake-contents/flake.nix b/src/flake-contents/flake.nix index 9abd4df..b1c1207 100644 --- a/src/flake-contents/flake.nix +++ b/src/flake-contents/flake.nix @@ -90,7 +90,7 @@ value = attrs.derivation.${outputName}.outPath; } ) - attrs.derivation.outputs + (attrs.derivation.outputs or ["out"]) ) else null; From 68bee5ec8a68546eeb961c13729200ecd52c390b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 13 Sep 2024 16:03:44 +0200 Subject: [PATCH 4/4] Fix formatting --- src/flake-contents/flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flake-contents/flake.nix b/src/flake-contents/flake.nix index b1c1207..eac7e6a 100644 --- a/src/flake-contents/flake.nix +++ b/src/flake-contents/flake.nix @@ -90,7 +90,7 @@ value = attrs.derivation.${outputName}.outPath; } ) - (attrs.derivation.outputs or ["out"]) + (attrs.derivation.outputs or [ "out" ]) ) else null;