1
0
Fork 0

Fix build on hera

This commit is contained in:
Malte 2023-01-16 03:06:03 +01:00
parent ffa5f91c24
commit aa3a056b4a
4 changed files with 37 additions and 9 deletions

View file

@ -15,7 +15,5 @@ in {
emanote
helix
;
nixpkgs-bot = (myFlake "nixpkgs-bot").default;
nix-output-monitor = (myFlake "nix-output-monitor").default;
inherit (myFlake "mastodon_digest") mastodon_digest;
}

View file

@ -2,12 +2,12 @@ diff --git a/thresholds.py b/thresholds.py
index 8d7f114..0802ff6 100644
--- a/thresholds.py
+++ b/thresholds.py
@@ -11,8 +11,6 @@ if TYPE_CHECKING:
@@ -11,6 +11,8 @@ if TYPE_CHECKING:
class Threshold(Enum):
- ALL = 0
- HALF = 50
+ ALL = 0
+ HALF = 50
LAX = 90
NORMAL = 95
STRICT = 98

View file

@ -14,10 +14,10 @@ final: prev: let
rev = "07d8827a79086263f0e0f161faa2c12e405b2929";
hash = "sha256-iFOvexzj5UQve67nvNcGthrvVbL5yQbYyUIXlaRYlug=";
};
patchedSrc = pkgs.runCommand "mastodon_digest-patched-src" '' { }
cp -r ${src} $out
chmod -R +w $out
patch -d $out -p1 < ${./all-posts.patch}
patchedSrc = pkgs.runCommand "mastodon_digest-patched-src" {} ''
cp -r ${src} $out
chmod -R +w $out
patch -d $out -p1 < ${./all-posts.patch}
'';
in {
mastodon_digest = pkgs.writeShellApplication {

View file

@ -0,0 +1,30 @@
final: prev: let
inherit (final) lib;
inherit (final.haskell.lib.compose) justStaticExecutables dontCheck markUnbroken appendPatch;
haskellPackages = final.haskellPackages.override {
overrides = hfinal: hprev: {
matrix-client =
appendPatch (final.fetchpatch {
url = "https://github.com/softwarefactory-project/matrix-client-haskell/commit/97cb1918fcdf9b0249c6c8e70c7bfc664d718022.patch";
sha256 = "sha256-YyxgfNO5RtqpKJ9UOYPlRple0FuNmjAB1iy9vYy0HOE=";
relative = "matrix-client";
})
hprev.matrix-client;
aeson-schemas = markUnbroken (dontCheck hprev.aeson-schemas);
};
};
cleanSelf = lib.sourceFilesBySuffices ../../apps/nixpkgs-bot [
".hs"
".cabal"
"CHANGELOG.md"
"LICENSE"
];
in {
nixpkgs-bot =
lib.pipe {}
[
(haskellPackages.callCabal2nix "nixpkgs-bot" cleanSelf)
haskellPackages.buildFromCabalSdist
justStaticExecutables
];
}