Cannot install trough configuration.nix
Zahrun opened this issue · 7 comments
I don't know what happened, it used to be fine, and the code didn't change in between.
I have
{ config, pkgs, lib, ... }:
let
nixos-conf-editor = import (pkgs.fetchFromGitHub {
owner = "vlinkz";
repo = "nixos-conf-editor";
rev = "0.1.1";
sha256 = "sha256-TeDpfaIRoDg01FIP8JZIS7RsGok/Z24Y3Kf+PuKt6K4=";
}) {};
in
{
environment.systemPackages =
with pkgs; [
nixos-conf-editor
# rest of your packages
];
}
But nixos-rebuild fails with
nixos-conf-editor-0.1.1-vendor.tar.gz> building '/nix/store/mwdwhrb58iig3qs4gzzksl9vlh9nsx2k-nixos-conf-editor-0.1.1-vendor.tar.gz.drv'
nixos-conf-editor-0.1.1-vendor.tar.gz> unpacking sources
nixos-conf-editor-0.1.1-vendor.tar.gz> unpacking source archive /nix/store/w9cj7n6p0ls01x9wx4rm5ym4xn59xhzw-d0ddxbyalkfbxdbnfa6xprl8g87n8zn1-source
nixos-conf-editor-0.1.1-vendor.tar.gz> source root is d0ddxbyalkfbxdbnfa6xprl8g87n8zn1-source
nixos-conf-editor-0.1.1-vendor.tar.gz> patching sources
nixos-conf-editor-0.1.1-vendor.tar.gz> configuring
nixos-conf-editor-0.1.1-vendor.tar.gz> no configure script, doing nothing
nixos-conf-editor-0.1.1-vendor.tar.gz> building
nixos-conf-editor-0.1.1-vendor.tar.gz> source = "git+https://github.com/snowflakelinux/nix-data#a75a234c2ffa661b6d3f6d276dc372677e5e2c74"
nixos-conf-editor-0.1.1-vendor.tar.gz>
nixos-conf-editor-0.1.1-vendor.tar.gz> ERROR: The Cargo.lock contains git dependencies
nixos-conf-editor-0.1.1-vendor.tar.gz>
nixos-conf-editor-0.1.1-vendor.tar.gz> This is currently not supported in the fixed-output derivation fetcher.
nixos-conf-editor-0.1.1-vendor.tar.gz> Use cargoLock.lockFile / importCargoLock instead.
nixos-conf-editor-0.1.1-vendor.tar.gz>
error: builder for '/nix/store/mwdwhrb58iig3qs4gzzksl9vlh9nsx2k-nixos-conf-editor-0.1.1-vendor.tar.gz.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/rdd0p9akqczj2dbw95i5yi2c70wj6dk5-nixos-conf-editor-0.1.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5rdwrqk7kfbh0w3nif2a6l8sfwiq80z3-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/wv3k9sw16asrs4yvvpk881g4kc4rsjr7-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ln2c1j40911v3bg2fflz55cdg866l2ln-nixos-system-nixos-23.05pre469482.e3652e0735f.drv' failed to build
Even the 'nix-env' installation fails with the same error.
git clone https://github.com/vlinkz/nixos-conf-editor
nix-env -f nixos-conf-editor -i nixos-conf-editor
cf. snowfallorg/nix-software-center#42
PS: Single run with flakes works fine
After running once with flakes, then I was able to nixos-rebuild for some reason...
I added a change to the default.nix
that should fix future issues related to this
Thank you! Can you tag a release having this?
I'm having the same issue, it doesn't seem to be fixed
@vlinkz could you push a new release/tag with the fix? Here's the warning I'm getting right now:
trace: warning: rustPlatform.rust.cargo is deprecated. Use cargo instead.
trace: warning: rustPlatform.rust.rustc is deprecated. Use rustc instead.
I think you have to modify these lines:
https://github.com/vlinkz/nixos-conf-editor/blob/e49b88f33a9357ea825a290564d6d472469f3290/default.nix#L27-L31
Ditto, on nixos unstable using configuration file (none flakes (still trying to figure out nixos without more complications))
trace: warning: rustPlatform.rust.cargo is deprecated. Use cargo instead.
trace: warning: rustPlatform.rust.rustc is deprecated. Use rustc instead.
these 14 derivations will be built:
/nix/store/gijz05w1ywp17lw7i3jdfl4g47897wxn-nixos-conf-editor-0.1.1-vendor.tar.gz.drv
/nix/store/mnnnq9884axzq3pgpq7d72p2ziszp952-nixos-conf-editor-0.1.1.drv
/nix/store/0an34v5w2ipbmwpkbjiafb38dgbbqvhp-system-path.drv
/nix/store/sdalp25jaxrsfpsgdjhrqnnqlsg7gkid-dbus-1.drv
/nix/store/2f22aihmzgfqv8shw5acwqvxw79j9pyn-X-Restart-Triggers-dbus.drv
/nix/store/6lsfrh18h5ns47pcif39m8a2gc2gyy9j-unit-accounts-daemon.service.drv
/nix/store/9cq7b8j8pscq5iw3ywalvzs4wma6vm19-X-Restart-Triggers-polkit.drv
/nix/store/r6h54d0szsqw9x21psw82a82fjf4imw3-unit-dbus.service.drv
/nix/store/j4d1kl2c5d6ckmkpvd9nqggc4jb6zjmd-user-units.drv
/nix/store/pgrhnj5f8hp5i6r0jrj3xwgb51b4lcfp-unit-dbus.service.drv
/nix/store/rfaammnghfwz4rbmzs6c53ad43gsbyzv-unit-polkit.service.drv
/nix/store/rp6igvacl7cl6z924dyg73c0gqnydb7n-system-units.drv
/nix/store/n0pkxwfgmf2vm02g9903b013j8mlrkq1-etc.drv
/nix/store/yycy7z6572s7zmnbbmqavb3c5jr7fzsy-nixos-system-nixos-23.11pre534806.5e4c2ada4fcd.drv
building '/nix/store/gijz05w1ywp17lw7i3jdfl4g47897wxn-nixos-conf-editor-0.1.1-vendor.tar.gz.drv'...
unpacking sources
unpacking source archive /nix/store/w9cj7n6p0ls01x9wx4rm5ym4xn59xhzw-d0ddxbyalkfbxdbnfa6xprl8g87n8zn1-source
source root is d0ddxbyalkfbxdbnfa6xprl8g87n8zn1-source
patching sources
updateAutotoolsGnuConfigScriptsPhase
configuring
no configure script, doing nothing
building
source = "git+https://github.com/snowflakelinux/nix-data#a75a234c2ffa661b6d3f6d276dc372677e5e2c74"
ERROR: The Cargo.lock contains git dependencies
This is currently not supported in the fixed-output derivation fetcher.
Use cargoLock.lockFile / importCargoLock instead.
error: builder for '/nix/store/gijz05w1ywp17lw7i3jdfl4g47897wxn-nixos-conf-editor-0.1.1-vendor.tar.gz.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/mnnnq9884axzq3pgpq7d72p2ziszp952-nixos-conf-editor-0.1.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0an34v5w2ipbmwpkbjiafb38dgbbqvhp-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/yycy7z6572s7zmnbbmqavb3c5jr7fzsy-nixos-system-nixos-23.11pre534806.5e4c2ada4fcd.drv' failed to build
Using the instructions under "NixOS installation" did not work for me either.
However, running nix run github:vlinkz/nixos-conf-editor
works (this took just over an hour to download and compile the first time on my machine!)
Even after running it this way once, installation through configuration.nix still doesn't work, as some people have suggested.
Machine info:
NixOS 24.05.20240403.fd281bd (Uakari) x86_64
nixpkgs channel: nixos-unstable
using configuration.nix