2023-03-15 21:57:31 +01:00
|
|
|
{
|
2023-08-03 16:49:50 +02:00
|
|
|
description = "Mobilizon fork for potsda.mn";
|
2023-03-15 21:57:31 +01:00
|
|
|
|
2023-08-09 15:48:22 +02:00
|
|
|
inputs = {
|
2023-09-10 10:52:50 +02:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-08-09 15:48:22 +02:00
|
|
|
nix-filter.url = "github:numtide/nix-filter";
|
|
|
|
};
|
2023-03-15 21:57:31 +01:00
|
|
|
|
2023-08-09 15:48:22 +02:00
|
|
|
outputs = { self, nixpkgs, nix-filter }:
|
2023-08-09 15:28:38 +02:00
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
2023-08-09 15:48:22 +02:00
|
|
|
filter = nix-filter.lib;
|
2023-08-09 15:28:38 +02:00
|
|
|
in
|
|
|
|
{
|
2023-03-15 21:57:31 +01:00
|
|
|
|
2023-08-09 16:03:20 +02:00
|
|
|
packages.x86_64-linux = {
|
|
|
|
mobilizon = pkgs.callPackage ./. {
|
|
|
|
src = filter {
|
|
|
|
root = ./.;
|
2023-08-10 20:43:08 +02:00
|
|
|
exclude = [
|
|
|
|
(filter.matchExt "nix")
|
|
|
|
"js"
|
|
|
|
];
|
2023-08-09 16:03:20 +02:00
|
|
|
};
|
2023-08-10 20:43:08 +02:00
|
|
|
src-config = ./config;
|
2023-08-09 16:03:20 +02:00
|
|
|
mobilizon-js = self.packages.x86_64-linux.mobilizon-frontend;
|
2023-08-09 15:48:22 +02:00
|
|
|
};
|
2023-08-03 17:26:07 +02:00
|
|
|
|
2023-08-09 16:03:20 +02:00
|
|
|
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
|
2023-03-15 21:57:31 +01:00
|
|
|
|
2023-08-09 16:03:20 +02:00
|
|
|
${pkgs.mix2nix}/bin/mix2nix ./mix.lock > mix.nix
|
|
|
|
'';
|
|
|
|
};
|
2023-03-15 21:57:31 +01:00
|
|
|
|
2023-08-09 15:28:38 +02:00
|
|
|
devShells.x86_64-linux.default =
|
|
|
|
pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
elixir
|
|
|
|
mix2nix
|
|
|
|
cmake
|
|
|
|
imagemagick
|
|
|
|
(yarn.override {
|
|
|
|
nodejs = nodejs-18_x;
|
|
|
|
})
|
|
|
|
yarn2nix
|
|
|
|
nodejs-18_x
|
|
|
|
];
|
|
|
|
};
|
2023-03-15 21:57:31 +01:00
|
|
|
|
2023-10-20 11:48:09 +02:00
|
|
|
checks.x86_64-linux = {
|
|
|
|
inherit (self.packages.x86_64-linux) mobilizon update;
|
|
|
|
};
|
|
|
|
|
2023-08-09 15:28:38 +02:00
|
|
|
};
|
2023-03-15 21:57:31 +01:00
|
|
|
}
|