2023-06-13 05:08:41 +00:00
|
|
|
{ gpodder
|
|
|
|
, fetchFromGitHub
|
2023-09-24 08:16:19 +00:00
|
|
|
, gitUpdater
|
2023-06-13 05:08:41 +00:00
|
|
|
, libhandy
|
|
|
|
}:
|
2023-09-24 08:16:19 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
self = gpodder.overridePythonAttrs (upstream: rec {
|
2023-06-13 05:08:41 +00:00
|
|
|
pname = "gpodder-adaptive";
|
2023-10-18 22:11:07 +00:00
|
|
|
version = "3.11.4+1";
|
2023-06-13 05:08:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gpodder";
|
|
|
|
repo = "gpodder";
|
|
|
|
rev = "adaptive/${version}";
|
2023-10-18 22:11:07 +00:00
|
|
|
hash = "sha256-ydbFwX44Pg2p4HknEQ7B74ZpRVILxxBxhjWeTKY9odc=";
|
2023-06-13 05:08:41 +00:00
|
|
|
};
|
|
|
|
|
2023-08-12 04:14:47 +00:00
|
|
|
# nixpkgs `gpodder` uses the `format = "other"` Makefile build flow.
|
|
|
|
# upstream specifies a Makefile, and it's just `setup.py` calls plus a few other deps.
|
|
|
|
# however, it calls the build Python, which breaks for cross compilation.
|
|
|
|
# nixpkgs knows how to cross-compile setuptools formats, so use that and only mimic the
|
|
|
|
# parts of the Makefile that aren't part of that.
|
|
|
|
# TODO: upstream this into main nixpkgs `gpodder` package.
|
|
|
|
format = "setuptools";
|
|
|
|
preBuild = ''
|
|
|
|
make \
|
|
|
|
"PREFIX=$(out)" \
|
|
|
|
"share/applications/gpodder-url-handler.desktop" \
|
|
|
|
"share/applications/gpodder.desktop" \
|
|
|
|
"share/dbus-1/services/org.gpodder.service"
|
|
|
|
'';
|
|
|
|
|
2024-03-05 02:58:21 +00:00
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $out/share/applications/gpodder-url-handler.desktop \
|
|
|
|
--replace-fail 'Exec=/bin/gpodder' 'Exec=gpodder'
|
|
|
|
'';
|
|
|
|
|
2023-06-13 05:08:41 +00:00
|
|
|
buildInputs = upstream.buildInputs ++ [
|
|
|
|
libhandy
|
|
|
|
];
|
2023-09-24 08:16:19 +00:00
|
|
|
|
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
rev-prefix = "adaptive/";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
in self // {
|
|
|
|
meta = self.meta // {
|
|
|
|
# ensure nix thinks the canonical position of this derivation is inside my own repo,
|
|
|
|
# not upstream nixpkgs repo. this ensures that the updateScript can patch the version/hash
|
|
|
|
# of the right file. meta.position gets overwritten if set in overrideAttrs, hence this
|
|
|
|
# manual `//` hack
|
|
|
|
position = let
|
2024-02-14 23:39:18 +00:00
|
|
|
pos = builtins.unsafeGetAttrPos "src" self;
|
2023-09-24 08:16:19 +00:00
|
|
|
in "${pos.file}:${builtins.toString pos.line}";
|
|
|
|
};
|
|
|
|
}
|