Minor fixes.
This commit is contained in:
@@ -30,15 +30,28 @@
|
||||
mkdir -p $out
|
||||
cp -r . $out/
|
||||
'';
|
||||
postFixup = ''
|
||||
substituteInPlace $out/bin/infinsweeper \
|
||||
--replace-fail '#!/usr/bin/env ruby' '#!${ruby}/bin/ruby'
|
||||
};
|
||||
|
||||
server = pkgs.writeShellApplication {
|
||||
name = "infinsweeper";
|
||||
runtimeInputs = [ ruby ];
|
||||
text = ''
|
||||
set -euo pipefail
|
||||
data_dir="''${INFINSWEEPER_DATA_DIR:-/var/lib/infinsweeper}"
|
||||
DB="$data_dir/infinsweeper.db"
|
||||
mkdir -p "$data_dir"
|
||||
exec ruby ${app}/main.rb
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.${system}.default = app;
|
||||
|
||||
apps.${system}.default = {
|
||||
type = "app";
|
||||
program = "${server}/bin/infinsweeper";
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
packages = [
|
||||
ruby
|
||||
|
||||
Reference in New Issue
Block a user