add nix update script

This commit is contained in:
778a69cd 2023-08-09 16:03:20 +02:00
parent 8038f967cc
commit 51ee15e659

View file

@ -14,7 +14,8 @@
in in
{ {
packages.x86_64-linux.mobilizon = pkgs.callPackage ./. { packages.x86_64-linux = {
mobilizon = pkgs.callPackage ./. {
src = filter { src = filter {
root = ./.; root = ./.;
exclude = [ (filter.matchExt "nix") ]; exclude = [ (filter.matchExt "nix") ];
@ -22,9 +23,20 @@
mobilizon-js = self.packages.x86_64-linux.mobilizon-frontend; mobilizon-js = self.packages.x86_64-linux.mobilizon-frontend;
}; };
packages.x86_64-linux.mobilizon-frontend = pkgs.callPackage ./js { inherit filter; }; mobilizon-frontend = pkgs.callPackage ./js { inherit filter; };
packages.x86_64-linux.default = self.packages.x86_64-linux.mobilizon; 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 = devShells.x86_64-linux.default =
let let