2018-12-02 12:41:15 +01:00
|
|
|
{ stdenv, fetchFromGitHub, pkgconfig, go, gobject-introspection,
|
2018-11-13 12:20:01 +01:00
|
|
|
libgudev, deepin, fetchurl }:
|
2018-09-08 17:30:30 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "go-gir-generator";
|
2018-10-31 01:16:21 +01:00
|
|
|
version = "1.1.0";
|
2018-09-08 17:30:30 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxdeepin";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2018-10-31 01:16:21 +01:00
|
|
|
sha256 = "0grp4ffy3vmlknzmymnxq1spwshff2ylqsw82pj4y2v2fcvnqfvb";
|
2018-09-08 17:30:30 +02:00
|
|
|
};
|
|
|
|
|
2018-11-13 12:20:01 +01: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 = [
|
2018-12-02 12:41:15 +01:00
|
|
|
gobject-introspection
|
2018-09-08 17:30:30 +02:00
|
|
|
libgudev
|
|
|
|
];
|
|
|
|
|
2018-10-12 13:06:54 +02:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|