{stdenv, writeText, callPackage, bundlerEnv, ruby_3_2 }: let gemfile-patch = callPackage ./gemfile-patch.nix {}; src = callPackage ./source.nix { patches = [gemfile-patch];}; gems = bundlerEnv { name = "loomio-env"; ruby = ruby_3_2; gemset = ./. + "/gemset.nix"; gemdir = src; }; databaseConfig = writeText "database.yml" '' production: url: <%= ENV['DATABASE_URL'] %> ''; in stdenv.mkDerivation { name = "loomio"; inherit src; buildInputs = [gems ruby_3_2]; installPhase = '' mkdir -p $out/{bin,share/loomio} cp -r * $out/share/loomio bin=$out/bin/loomio cp ${databaseConfig} $out/share/loomio/config/database.yml cat > $bin <