diff --git a/pkgs/tools/package-management/akku/default.nix b/pkgs/tools/package-management/akku/default.nix new file mode 100644 index 000000000000..e1baf2e0b1eb --- /dev/null +++ b/pkgs/tools/package-management/akku/default.nix @@ -0,0 +1,41 @@ +{ lib, stdenv, fetchFromGitLab, autoreconfHook, pkg-config, guile, curl, substituteAll }: + +stdenv.mkDerivation rec { + pname = "akku"; + version = "1.1.0"; + + src = fetchFromGitLab { + owner = "akkuscm"; + repo = "akku"; + rev = "v${version}"; + sha256 = "1pi18aamg1fd6f9ynfl7zx92052xzf0zwmhi2pwcwjs1kbah19f5"; + }; + + patches = [ + # substitute libcurl path + (substituteAll { + src = ./hardcode-libcurl.patch; + libcurl = "${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary}"; + }) + ]; + + nativeBuildInputs = [ autoreconfHook pkg-config ]; + + buildInputs = [ guile ]; + + # Use a dummy package index to boostrap Akku + preBuild = '' + touch bootstrap.db + ''; + + makeFlags = [ "GUILE_AUTO_COMPILE=0" ]; + + meta = with lib; { + homepage = "https://akkuscm.org/"; + description = "Language package manager for Scheme"; + changelog = "https://gitlab.com/akkuscm/akku/-/raw/v${version}/NEWS.md"; + platforms = platforms.all; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ marsam ]; + }; +} diff --git a/pkgs/tools/package-management/akku/hardcode-libcurl.patch b/pkgs/tools/package-management/akku/hardcode-libcurl.patch new file mode 100644 index 000000000000..7c5b8b50c320 --- /dev/null +++ b/pkgs/tools/package-management/akku/hardcode-libcurl.patch @@ -0,0 +1,18 @@ +--- old/private/http.scm ++++ new/private/http.scm +@@ -101,14 +101,7 @@ + ;; shouldn't, but it's an old issue. + (log/error "Could not load libcurl. Please install the curl development(!) package.") + (exit 1))) +- (case (os-name) +- ((darwin) (set! libcurl (open-shared-object "libcurl.dylib"))) +- ((msys) (set! libcurl (open-shared-object "msys-curl-4"))) +- (else +- (guard (exn +- (else +- (set! libcurl (open-shared-object "libcurl.so.3")))) +- (set! libcurl (open-shared-object "libcurl.so.4")))))) ++ (set! libcurl (open-shared-object "@libcurl@"))) + (letrec () + (define %curl_global_init (foreign-procedure libcurl int curl_global_init (long))) + (call %curl_global_init #b11))) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 58db6492610a..d67c5102d94e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -867,6 +867,8 @@ with pkgs; inherit (plasma5Packages) kdialog; }; + akku = callPackage ../tools/package-management/akku { }; + albert = libsForQt5.callPackage ../applications/misc/albert {}; arch-install-scripts = callPackage ../tools/misc/arch-install-scripts {};