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-01 17:37:02 +00:00
|
|
|
yarnLock = "${src}/yarn.lockd";
|
2022-11-01 17:08:59 +00:00
|
|
|
sha256 = "0v47h3a0cw5fhffp0bajazd3731zkzqvn0vh4klpd4a29mf26y6n";
|
|
|
|
};
|
|
|
|
});
|
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
|
|
|
})
|