2023-07-18 15:02:54 +00:00
|
|
|
{ fetchFromGitHub, fetchzip, pkgs }:
|
2022-04-30 20:43:12 +00:00
|
|
|
|
2023-07-18 15:02:54 +00:00
|
|
|
# slightly cursed, but possibly better than the previous packaging.
|
|
|
|
# dream2nix is not used via flakes because it has weirdly many dependencies
|
|
|
|
#
|
|
|
|
# to update uffd's dependencies, do run the `resolve` output of the below derivation
|
2022-04-30 20:43:12 +00:00
|
|
|
|
2023-07-18 15:02:54 +00:00
|
|
|
let
|
|
|
|
dream2nix = import (fetchFromGitHub {
|
|
|
|
owner = "nix-community";
|
|
|
|
repo = "dream2nix";
|
|
|
|
rev = "548ced938de2b007f40a3dc3e5d156ff58555cdc";
|
|
|
|
sha256 =
|
|
|
|
"sha256-FaeGth9m9k5QGsQfg+iY0CuRNyy5lSM06u1Mra5bO/M="; # pkgs.lib.fakeSha256;
|
|
|
|
});
|
|
|
|
d2n = dream2nix.lib.init {
|
|
|
|
inherit pkgs;
|
|
|
|
config.projectRoot = ./..;
|
|
|
|
};
|
2022-04-30 20:43:12 +00:00
|
|
|
src = fetchzip {
|
2023-07-18 15:02:54 +00:00
|
|
|
url = "https://git.cccv.de/uffd/uffd/-/archive/v2.1.0/uffd-v2.1.0.tar.gz";
|
|
|
|
hash = "sha256-OIsaMxzrVW4ATxbaetlNlCwXsnycun1i3wdzTg1EHN0=";
|
|
|
|
postFetch = ''
|
|
|
|
sed -i -e 's/local/2.1.0/g' $out/setup.py
|
|
|
|
'';
|
2022-04-30 20:43:12 +00:00
|
|
|
};
|
2023-07-18 15:02:54 +00:00
|
|
|
outputs = d2n.dream2nix-interface.makeOutputs {
|
|
|
|
discoveredProjects = [{
|
|
|
|
name = "uffd";
|
|
|
|
relPath = "";
|
|
|
|
subsystem = "python";
|
|
|
|
translator = "pip";
|
|
|
|
translators = [ "pip" ];
|
|
|
|
subsystemInfo.pythonAttr = "python3";
|
|
|
|
dreamLockPath = "./dream2nix-packages/uffd/dream-lock.json";
|
|
|
|
}];
|
|
|
|
source = src;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
uffd = outputs.packages.uffd;
|
|
|
|
uffd-resolve-deps = outputs.packages.uffd.resolve;
|
2022-04-30 20:43:12 +00:00
|
|
|
}
|