nixpkgs/pkgs/desktops/deepin/go-gir-generator/default.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, pkgconfig, go, gobject-introspection,
libgudev, deepin, fetchurl }:
2018-09-08 17:30:30 +02:00
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "go-gir-generator";
version = "1.1.0";
2018-09-08 17:30:30 +02:00
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "0grp4ffy3vmlknzmymnxq1spwshff2ylqsw82pj4y2v2fcvnqfvb";
2018-09-08 17:30:30 +02:00
};
patches = [
# fix: dde-api build error with gobject-introspection 1.58+
(fetchurl {
url = https://github.com/linuxdeepin/go-gir-generator/commit/a7ab229201e28d1be727f5021b3588fa4a1acf5f.patch;
sha256 = "13ywalwkjg8wwvd0pvmc2rv1h38airyvimdn9jfb5wis9xm48401";
})
];
2018-09-08 17:30:30 +02:00
nativeBuildInputs = [
pkgconfig
go
];
buildInputs = [
gobject-introspection
2018-09-08 17:30:30 +02:00
libgudev
];
postPatch = ''
sed -i -e 's:/share/gocode:/share/go:' Makefile
'';
2018-09-08 17:30:30 +02:00
makeFlags = [
"PREFIX=$(out)"
2019-02-28 02:46:32 +01:00
"GOCACHE=$TMPDIR/go-cache"
2018-09-08 17:30:30 +02:00
];
2018-10-30 23:17:45 +01:00
passthru.updateScript = deepin.updateScript { inherit name; };
2018-09-08 17:30:30 +02:00
meta = with stdenv.lib; {
description = "Generate static golang bindings for GObject";
homepage = https://github.com/linuxdeepin/go-gir-generator;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ romildo ];
};
}