Skip to content

Commit

Permalink
libgpgperror: Add derivation for gen-posix-lock-obj to help in cross-…
Browse files Browse the repository at this point in the history
…compilation
  • Loading branch information
shlevy committed Feb 25, 2018
1 parent 3d8a664 commit 7d7b7a0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
21 changes: 18 additions & 3 deletions pkgs/development/libraries/libgpg-error/default.nix
@@ -1,6 +1,21 @@
{ stdenv, buildPackages, fetchurl, gettext }:
{ stdenv, buildPackages, fetchurl, gettext
, genPosixLockObjOnly ? false
}: let
genPosixLockObjOnlyAttrs = stdenv.lib.optionalAttrs genPosixLockObjOnly {
buildPhase = ''
cd src
make gen-posix-lock-obj
'';

installPhase = ''
mkdir -p $out/bin
install -m755 gen-posix-lock-obj $out/bin
'';

stdenv.mkDerivation rec {
outputs = [ "out" ];
outputBin = "out";
};
in stdenv.mkDerivation (rec {
name = "libgpg-error-${version}";
version = "1.27";

Expand Down Expand Up @@ -49,4 +64,4 @@ stdenv.mkDerivation rec {
platforms = platforms.all;
maintainers = [ maintainers.fuuzetsu maintainers.vrthra ];
};
}
} // genPosixLockObjOnlyAttrs)
5 changes: 5 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -9714,6 +9714,11 @@ with pkgs;

libgpgerror = callPackage ../development/libraries/libgpg-error { };

# https://github.com/gpg/libgpg-error/blob/70058cd9f944d620764e57c838209afae8a58c78/README#L118-L140
libgpgerror-gen-posix-lock-obj = libgpgerror.override {
genPosixLockObjOnly = true;
};

libgphoto2 = callPackage ../development/libraries/libgphoto2 { };

libgpod = callPackage ../development/libraries/libgpod {
Expand Down

0 comments on commit 7d7b7a0

Please sign in to comment.