Hello, I am trying to package SimpleX for nixos and am running into a snag due to the version of haskellPackages.primitive being too high, however, when I try to adjust the version like the rest, I either get a infinite recursion or I get a host of weird compile errors when I try to compile it from scratch (This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.)
Any idea on what I am doing wrong, or if this is even possible? Full current package version below:
{
lib,
haskell,
stdenv,
fetchFromGitHub,
}:
let
version = "6.4.1";
smpCC = haskell.packages.ghc963.override {
overrides = _final: _prev: {
deepseq = _final.developPackage {
root = fetchFromGitHub {
owner = "haskell";
repo = "deepseq";
tag = "v1.4.8.1";
sha256 = "sha256-XJFTH2CWsqDgtgr0qpA53KpAX7dtoi2SGFqZLKoFZdA=";
};
cabal2nixOptions = "--no-check";
};
primitive = _final.developPackage {
root = fetchFromGitHub {
owner = "haskell";
repo = "primitive";
tag = "v0.8.0.0";
sha256 = "sha256-Vhywv1FFZY5ofCU5dsQWdKwk4bsbMnpdUpFyUTaKZX4=";
};
cabal2nixOptions = "--no-check";
};
aeson = _final.developPackage {
root = fetchFromGitHub {
repo = "aeson";
owner = "simplex-chat";
rev = "aab7b5a14d6c5ea64c64dcaee418de1bb00dcc2b";
hash = "sha256-OTuJENv5I+9bWy6crllDm1lhkncmye33SCiqh1Sb50s=";
};
source-overrides = {
Diff = "0.4.1";
th-abstraction = "0.6.0.0";
witherable = "0.4.2";
nothunks = "0.1.5";
hedgehog = "1.4";
};
};
hs-socks = _final.developPackage {
root = fetchFromGitHub {
repo = "hs-socks";
owner = "simplex-chat";
rev = "a30cc7a79a08d8108316094f8f2f82a0c5e1ac51";
hash = "";
};
};
direct-sqlcipher = _final.developPackage {
root = fetchFromGitHub {
repo = "direct-sqlcipher";
owner = "simplex-chat";
rev = "f814ee68b16a9447fbb467ccc8f29bdd3546bfd9";
hash = "sha256-9/K1pnUnUTLj6OV5neQF6bDrQvtgi0a4VekJQuuGPE4=";
};
};
sqlcipher-simple = _final.developPackage {
root = fetchFromGitHub {
repo = "sqlcipher-simple";
owner = "simplex-chat";
rev = "a46bd361a19376c5211f1058908fc0ae6bf42446";
hash = "sha256-9JV2odagCkUWUGEe8dWmqHfjcBmn6rf6FAEBhxo6Gfw=";
};
cabal2nixOptions = "--no-check";
};
warp-tls = _final.developPackage {
root =
(fetchFromGitHub {
repo = "wai";
owner = "yesodweb";
rev = "ec5e017d896a78e787a5acea62b37a4e677dec2e";
hash = "sha256-fQmWamDI1OHmnWZKsROukFh6JAUCi7IyjjJ5J2+9bLI=";
})
+ "/warp-tls";
};
warp = _final.developPackage {
root =
(fetchFromGitHub {
repo = "wai";
owner = "simplex-chat";
rev = "2f6e5aa5f05ba9140ac99e195ee647b4f7d926b0";
hash = "sha256-xKvzAZBnynDAAB1jIsir0AwYstcNW8SZC/cH12QmL6U=";
})
+ "/warp";
};
};
};
simplexmq = smpCC.developPackage {
root = fetchFromGitHub {
repo = "simplexmq";
owner = "simplex-chat";
tag = "v${version}";
hash = "sha256-g25/CTUlWior+wk6fru39zvAIj99J+penu+W8HaqlNI=";
};
};
in
stdenv.mkDerivation {
pname = "simplex-server";
inherit version;
src = simplexmq;
installPhase = ''
mkdir -p "$out"
'';
meta = {
homepage = "https://github.com/simplex-chat/simplexmq";
description = "SimpleX Server for routing messages";
license = lib.licenses.agpl3Only;
platforms = lib.platforms.linux;
};
}