| 6 Nov 2023 |
matthewcroughan | * then src is an outPath with the Cargo.lock in it | 21:06:43 |
matthewcroughan | Oh, I didn't realise nixpkgs banned that | 21:06:48 |
K900 | And if you're doing that, you might as well do IFD | 21:06:50 |
matthewcroughan | I don't understand why, or why that's bad, compared to IFD | 21:07:02 |
K900 | The whole point of not doing IFD or anything IFD-adjacent is to make it so you can evaluate nixpkgs offline | 21:07:04 |
matthewcroughan | Oh, I can actually do that? | 21:07:21 |
K900 | Yes? | 21:07:26 |
K900 | How do you think all the VM tests work | 21:07:32 |
K900 | And the manual build | 21:07:35 |
K900 | And the everything else | 21:07:37 |
matthewcroughan | I can go offline, and instantiated all the drv files, without the internet, but with IFD I have to use the internet to instantiate the drvs? | 21:07:42 |
matthewcroughan | * I can go offline, and instantiate all the drv files, without the internet, but with IFD I have to use the internet to instantiate the drvs? | 21:07:46 |
K900 | Yes | 21:07:53 |
matthewcroughan | Does builtins.fetchTarball change that? I didn't know. | 21:08:35 |
matthewcroughan | Is that explained anywhere, somewhere I haven't read? I didn't know what the motivating factor for banning IFD was, just that it was supposed to be bad. | 21:09:45 |
K900 | How would it fetch | 21:10:19 |
K900 | If there is no internet | 21:10:21 |
matthewcroughan | drv files are instructions of how to do something, then when you realise them, then it would go to the internet, I thought | 21:10:53 |
matthewcroughan | ah, but the outPath is FOD and content addressed, so calculating that outPath relies on realisation | 21:11:17 |
K900 | builtins.fetchTarball does not produce a drv | 21:11:18 |
K900 | It runs at eval time | 21:11:21 |
K900 | And then you need to get the contents of it to continue evaluation | 21:11:35 |
K900 | Which is basically IFD | 21:11:46 |
K900 | (except it's not technically FD) | 21:11:52 |
matthewcroughan | yeah, so anything that requires the internet to fill the key/values in a drv | 21:12:01 |
K900 | And I see the problem with overrides now | 21:12:44 |
K900 | I think | 21:12:54 |
adisbladis | In reply to @zeratax:dmnd.sh
this works:
#pyproject.toml
[tool.poetry.scripts]
deploy_cluster_aws = "deploy_cluster_aws:main"
while this doesn't
#pyproject.toml
[tool.poetry.scripts]
deploy_cluster_aws = { reference = "deploy_cluster_aws", extras = ["aws"], type="console" }
but should be valid, no? https://python-poetry.org/docs/pyproject/#scripts
$ nix develop
warning: Git tree '/home/jonaa/git/deployment' is dirty
error: value is a set while a string was expected
at /nix/store/knlmp0ljafmp1k4fkf61jdhia6l9kw1q-source/shell-scripts.nix:8:31:
7| let
8| elem = builtins.elemAt (builtins.split ":" entrypoint);
| ^
9| module = elem 0;
(use '--show-trace' to show detailed location information)
I think this would make it work:
diff --git a/shell-scripts.nix b/shell-scripts.nix
index 23362a2..d45117d 100644
--- a/shell-scripts.nix
+++ b/shell-scripts.nix
@@ -4,8 +4,10 @@
}:
let
mkScript = bin: entrypoint:
- let
- elem = builtins.elemAt (builtins.split ":" entrypoint);
+ let
+ elem = builtins.elemAt (builtins.split ":" (
+ if builtins.typeOf entrypoint == "set" then entrypoint.reference else entrypoint
+ ));
module = elem 0;
fn = elem 2;
in
| 21:34:22 |
adisbladis | In reply to @zeratax:dmnd.sh
this works:
#pyproject.toml
[tool.poetry.scripts]
deploy_cluster_aws = "deploy_cluster_aws:main"
while this doesn't
#pyproject.toml
[tool.poetry.scripts]
deploy_cluster_aws = { reference = "deploy_cluster_aws", extras = ["aws"], type="console" }
but should be valid, no? https://python-poetry.org/docs/pyproject/#scripts
$ nix develop
warning: Git tree '/home/jonaa/git/deployment' is dirty
error: value is a set while a string was expected
at /nix/store/knlmp0ljafmp1k4fkf61jdhia6l9kw1q-source/shell-scripts.nix:8:31:
7| let
8| elem = builtins.elemAt (builtins.split ":" entrypoint);
| ^
9| module = elem 0;
(use '--show-trace' to show detailed location information)
* I think this would make it work:
diff --git a/shell-scripts.nix b/shell-scripts.nix
index 23362a2..d45117d 100644
--- a/shell-scripts.nix
+++ b/shell-scripts.nix
@@ -4,8 +4,10 @@
}:
let
mkScript = bin: entrypoint:
- let
- elem = builtins.elemAt (builtins.split ":" entrypoint);
+ let
+ elem = builtins.elemAt (builtins.split ":" (
+ if builtins.typeOf entrypoint == "set" then entrypoint.reference else entrypoint
+ ));
module = elem 0;
fn = elem 2;
in
| 21:34:33 |
| 7 Nov 2023 |
| Alexandro de Oliveira joined the room. | 02:07:25 |