R3DC0DE
November 30, 2023, 9:57am
1
I’m trying to install a package : GitHub - Aylur/ags: A customizable and extensible shell which has it’s default.nix file in a subdirectory. It seems it’s causing some issues because nix cannot find it when I rebuild my system.
opening file /nix/store/***/default.nix : No such file or directory
Here is how I fetch the repo :
{ config, pkgs, ... }:
let aylur-gtk-shell = import (builtins.fetchGit {
url = "https://github.com/Aylur/ags.git"
ref = "main"
});
in {
environment.systemPackages = [
aylur-gtk-shell
];
}
Is it possible to specify where default.nix file is in the repo (it is in nix folder) ?
vccs
November 30, 2023, 1:29pm
2
You need to use the correct path. Nix can’t guess what you want. Try
"${builtins.fetchGit {
url = "https://github.com/Aylur/ags.git"
ref = "main"
}}/nix"
And I thought you need to callPackage
.
R3DC0DE
November 30, 2023, 3:48pm
3
I get this error
error: A definition for option `environment.systemPackages."[definition 1-entry 1]"' is not of type `package'. Definition values:
- In `/etc/nixos/ags.nix': <function, args: {buildNpmPackage, extraPackages?, fetchFromGitLab, gjs, glib-networking, gnome, gobject-introspection, gtk-layer-shell, gtk3, gvfs, lib, libdbusmenu-gtk3, libpulseaudio, meson, networkmanager, ninja, nodePackages, pkg-config, python3, stdenv, upower, wrapGAppsHook}>
I’m fairly new to nix, so how do I use callPackage in my case ? I’m still very unsure on how everything works together.
vccs
December 1, 2023, 6:28am
4
Yes. As you can see:
is not of type `package’
<function, ...
It’s a function and you need to use callPackage to make it a package.
pkgs.callPackage "${builtins.fetchGit {
url = "https://github.com/Aylur/ags.git"
ref = "main"
}}/nix" { };
R3DC0DE
December 2, 2023, 11:39am
5
Thank you, it did work ! Unfortunately, the build failed, but those are compile errors.