Hello, I’m trying to compile my very first Nix package, which downloads and installs an Openbox theme from Gitlab:
Nord Openbox Theme
All I need to do is copy the openbox-3
directory into $out/share/themes
in the package.
I get the error
error: function ‘anonymous lambda’ called without required argument ‘lib’
Disclaimer - I’m not the author, just a user who wants to use his theme on NixOS Openbox
Here is the Nix code. Some was derived from code generated by Google Gemini AI
Thank you for advice.
{ pkgs ? import <nixpkgs> {}, stdenv, lib, ... }:
stdenv.mkDerivation rec {
pname = "nord-openbox-theme";
version = "master"; # no version number in repository
src = pkgs.fetchgit {
url = "gitlab.com/the-zero885/${pname}";
# rev = "1818f7a1ba4f397cceb9023f7e14b35201e597f1";
hash = "sha256-oaZ+YZOCIUzetCYs0BVXzmbGn96qKiJcRS/kCi2nyQY=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/themes/${pname}/
cp -ar openbox-3/ $out/share/themes/${pname}/
runHook postInstall
'';
meta = with lib; {
description = "Openbox Nordic theme by César Salazar";
longDescription = "This Openbox theme can also complement the `nordic` Nix package";
homepage = "https://gitlab.com/the-zero885/${pname}";
license = licenses.mit;
maintainers = with maintainers; [ to-be-added ];
};
}