From 55db199650890badc1ad322ebdf59208784b11ff Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 28 Aug 2021 00:04:20 +0000 Subject: [PATCH] akku: init at 1.1.0 --- .../tools/package-management/akku/default.nix | 41 +++++++++++++++++++ .../akku/hardcode-libcurl.patch | 18 ++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 61 insertions(+) create mode 100644 pkgs/tools/package-management/akku/default.nix create mode 100644 pkgs/tools/package-management/akku/hardcode-libcurl.patch 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 16abc141d983..6f512d7be9f1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -865,6 +865,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 {};