2021-09-02 20:48:34 +01:00
|
|
|
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
let
|
2021-09-03 11:32:57 +01:00
|
|
|
src = import ./source.nix;
|
2022-11-01 17:08:59 +00:00
|
|
|
phase1 = pkgs.mastodon.override {
|
|
|
|
pname = "mastodon-queer-af";
|
|
|
|
version = "main";
|
|
|
|
srcOverride = src;
|
|
|
|
dependenciesDir = src;
|
|
|
|
};
|
2021-09-02 20:48:34 +01:00
|
|
|
in
|
2022-11-01 17:37:02 +00:00
|
|
|
phase1.overrideAttrs (prev: rec {
|
|
|
|
mastodon-modules = prev.mastodon-modules.overrideAttrs (prev: {
|
|
|
|
pname = "${prev.pname}-mod";
|
2022-11-01 17:08:59 +00:00
|
|
|
yarnOfflineCache = pkgs.fetchYarnDeps {
|
2022-11-12 10:31:04 +00:00
|
|
|
yarnLock = "${src}/yarn.lock";
|
2023-07-05 21:52:26 +01:00
|
|
|
sha256 = "05phsp5wj2p63vjd8hr9h39wxqwz3j8zqh4avj8mwrsh23ahkxgi";
|
2022-11-01 17:08:59 +00:00
|
|
|
};
|
|
|
|
});
|
2022-11-01 17:37:02 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
ln -s ${mastodon-modules}/node_modules node_modules
|
|
|
|
ln -s ${mastodon-modules}/public/assets public/assets
|
|
|
|
ln -s ${mastodon-modules}/public/packs public/packs
|
|
|
|
patchShebangs bin/
|
|
|
|
for b in $(ls ${prev.mastodon-gems}/bin/)
|
|
|
|
do
|
|
|
|
if [ ! -f bin/$b ]; then
|
|
|
|
ln -s ${prev.mastodon-gems}/bin/$b bin/$b
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
rm -rf log
|
|
|
|
ln -s /var/log/mastodon log
|
|
|
|
ln -s /tmp tmp
|
|
|
|
'';
|
2022-11-01 17:08:59 +00:00
|
|
|
})
|