58 lines
1.4 KiB
Nix
58 lines
1.4 KiB
Nix
{
|
|
description = "Mobilizon fork for potsda.mn";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:erictapen/nixpkgs/mobilizon-3";
|
|
nix-filter.url = "github:numtide/nix-filter";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, nix-filter }:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs { inherit system; };
|
|
filter = nix-filter.lib;
|
|
in
|
|
{
|
|
|
|
packages.x86_64-linux = {
|
|
mobilizon = pkgs.callPackage ./. {
|
|
src = filter {
|
|
root = ./.;
|
|
exclude = [ (filter.matchExt "nix") ];
|
|
};
|
|
mobilizon-js = self.packages.x86_64-linux.mobilizon-frontend;
|
|
};
|
|
|
|
mobilizon-frontend = pkgs.callPackage ./js { inherit filter; };
|
|
|
|
default = self.packages.x86_64-linux.mobilizon;
|
|
|
|
# Update local Mobilizon definition
|
|
update =
|
|
pkgs.writeShellScriptBin "update" ''
|
|
set -eou pipefail
|
|
|
|
${pkgs.yarn2nix}/bin/yarn2nix --lockfile="./js/yarn.lock" > js/yarn.nix
|
|
${pkgs.mix2nix}/bin/mix2nix ./mix.lock > mix.nix
|
|
'';
|
|
|
|
};
|
|
|
|
devShells.x86_64-linux.default =
|
|
pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
elixir
|
|
mix2nix
|
|
cmake
|
|
imagemagick
|
|
(yarn.override {
|
|
nodejs = nodejs-18_x;
|
|
})
|
|
yarn2nix
|
|
nodejs-18_x
|
|
];
|
|
};
|
|
|
|
};
|
|
}
|