-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from imincik/add-basic-process-test
tests: add basic-process example test
- Loading branch information
Showing
6 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ jobs: | |
matrix: | ||
example: | ||
- basic | ||
- basic-process | ||
os: | ||
- ubuntu-22.04 | ||
# - macos-11 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
description = "Geospatial NIX"; | ||
|
||
nixConfig = { | ||
extra-substituters = [ | ||
"https://geonix.cachix.org" | ||
"https://devenv.cachix.org" | ||
]; | ||
extra-trusted-public-keys = [ | ||
"geonix.cachix.org-1:iyhIXkDLYLXbMhL3X3qOLBtRF8HEyAbhPXjjPeYsCl0=" | ||
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" | ||
]; | ||
bash-prompt = "\\[\\033[1m\\][geonix]\\[\\033\[m\\]\\040\\w >\\040"; | ||
}; | ||
|
||
inputs = { | ||
geonix.url = "github:imincik/geospatial-nix"; | ||
nixpkgs.follows = "geonix/nixpkgs"; | ||
devenv = { | ||
url = "path:../../."; | ||
inputs.nixpkgs.follows = "geonix/nixpkgs"; | ||
}; | ||
nix2container = { | ||
url = "github:nlewo/nix2container"; | ||
inputs.nixpkgs.follows = "geonix/nixpkgs"; | ||
}; | ||
mk-shell-bin.url = "github:rrbutani/nix-mk-shell-bin"; | ||
}; | ||
|
||
outputs = inputs@{ flake-parts, ... }: | ||
flake-parts.lib.mkFlake { inherit inputs; } { | ||
|
||
imports = [ | ||
inputs.devenv.flakeModule | ||
]; | ||
|
||
systems = [ "x86_64-linux" ]; | ||
|
||
perSystem = { config, self', inputs', pkgs, system, ... }: { | ||
|
||
devenv.shells.default = { | ||
imports = [ | ||
inputs.geonix.modules | ||
./geonix.nix | ||
]; | ||
}; | ||
|
||
packages.geonixcli = inputs.geonix.packages.${system}.geonixcli; | ||
}; | ||
|
||
flake = { }; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# | ||
# Use https://geospatial-nix.today to add more configuration. | ||
# | ||
|
||
{ inputs, config, lib, pkgs, ... }: | ||
|
||
let | ||
geopkgs = inputs.geonix.packages.${pkgs.system}; | ||
|
||
in { | ||
processes.test.exec = '' | ||
echo "Running test service" | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source ../common.sh | ||
|
||
assemble_devenv | ||
procfilescript=$(nix "${NIX_FLAGS[@]}" build --impure --no-link --print-out-paths .#devenv-up) | ||
exec $procfilescript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
NIX_FLAGS=( --accept-flake-config --no-warn-dirty --extra-experimental-features nix-command --extra-experimental-features flakes ) | ||
|
||
|
||
function assemble_devenv { | ||
# see: https://github.com/cachix/devenv/blob/405a4c6a3fecfd2a7fb37cc13f4e760658e522e6/src/devenv.nix#L29 | ||
|
||
DEVENV_DIR="$(pwd)/.devenv" | ||
DEVENV_STATE="$DEVENV_DIR"/state | ||
export DEVENV_DIR | ||
export DEVENV_STATE | ||
} | ||
|