Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
walint
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
hub
walint
Commits
f124e337
Commit
f124e337
authored
2 years ago
by
stuebinm
Browse files
Options
Downloads
Patches
Plain Diff
new nix build things
parent
a29be831
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
Readme.md
+3
-4
3 additions, 4 deletions
Readme.md
config.toml
+7
-9
7 additions, 9 deletions
config.toml
default.nix
+49
-40
49 additions, 40 deletions
default.nix
flake.lock
+27
-0
27 additions, 0 deletions
flake.lock
flake.nix
+12
-0
12 additions, 0 deletions
flake.nix
with
98 additions
and
53 deletions
Readme.md
+
3
−
4
View file @
f124e337
...
...
@@ -13,11 +13,10 @@ special inter-assembly `world://` links).
`walint-mapserver`
is a minimal implementation of a server that periodically
fetches, lints, and adjusts maps from a set of git repositories, writing them
to a path that can then be served by a webserver. It can be used as a (very
simple) replacement for rc3's hub and mapservice at smaller events.
simple) replacement for rc3's hub and mapservice at smaller events — to get
started, manually list all map repositories in
`config.toml`
, then visit
`localhost:8080/admin/overview`
.
`cwality-maps`
is a small server for type-safe map templating, to be used if
maps need to be generated on-the-fly — for example, to provide custom intermediate
maps displaying CWs before another map can be reached.
## Installing
...
...
This diff is collapsed.
Click to expand it.
config.toml
+
7
−
9
View file @
f124e337
...
...
@@ -17,9 +17,9 @@ token = "hello, world!"
slug
=
"divoc"
# baseurl of maps as seen by the frontend
url
=
"https://
world.di.c3voc.de
/maps/"
url
=
"https://
example.org
/maps/"
# webdir into which maps should be written
webdir
=
"/tmp/var/www/
divoc
"
webdir
=
"/tmp/var/www/
example
"
webdir_human
=
"/tmp/var/www-human/divoc"
...
...
@@ -28,20 +28,18 @@ webdir_human = "/tmp/var/www-human/divoc"
generation
=
1
backlink_prefix
=
"world://lobby#start_"
contact_mail
=
"world@
muc.hacc.space
"
howto_link
=
"https://
di.c3voc.de/howto:world
"
contact_mail
=
"world@
example.org
"
howto_link
=
"https://
example.org
"
# linter's config for this org
lintconfig
=
"./config.json"
# map's entrypoint (only maps reachable from here are included)
entrypoint
=
"main.json"
[[org.repo]]
# I hate TOML
url
=
"https://gitlab.infra4future.de/hacc/events/hacc-map"
ref
=
"master"
name
=
"hacc"
[[org.repo]]
url
=
"https://github.com/namiko/assembly_2021"
ref
=
"master"
name
=
"haecksen"
# add more repos here …
This diff is collapsed.
Click to expand it.
default.nix
+
49
−
40
View file @
f124e337
{
nixpkgs
?
import
<
nixpkgs
>
{},
compiler
?
"default"
,
doBenchmark
?
false
}:
let
sources
=
import
./nix/sources.nix
{};
haskellNix
=
import
sources
.
haskellNix
{};
# Import nixpkgs and pass the haskell.nix provided nixpkgsArgs
pkgs
=
import
# use haskell.nix's nixpkgs, which may (?) have more substitutes available
haskellNix
.
sources
.
nixpkgs-unstable
# args for nixpkgs; includes the haskell.nix overlay
(
haskellNix
.
nixpkgsArgs
//
{
system
=
"x86_64-linux"
;
});
inherit
(
nixpkgs
)
pkgs
;
f
=
{
mkDerivation
,
aeson
,
aeson-pretty
,
async
,
base
,
base-compat
,
base64-bytestring
,
bytestring
,
containers
,
cryptohash-sha1
,
deepseq
,
directory
,
dotgen
,
either
,
extra
,
filepath
,
fmt
,
getopt-generics
,
hpack
,
http-client
,
http-types
,
lib
,
lucid
,
microlens-platform
,
monad-logger
,
network-uri
,
process
,
regex-tdfa
,
servant
,
servant-client
,
servant-lucid
,
servant-server
,
servant-websockets
,
stm
,
template-haskell
,
text
,
text-metrics
,
time
,
tomland
,
transformers
,
universum
,
uri-encode
,
uuid
,
vector
,
wai
,
wai-extra
,
warp
,
websockets
}:
mkDerivation
{
pname
=
"walint"
;
version
=
"0.1"
;
src
=
./.
;
isLibrary
=
true
;
isExecutable
=
true
;
libraryHaskellDepends
=
[
aeson
base
bytestring
containers
deepseq
dotgen
either
extra
filepath
getopt-generics
network-uri
regex-tdfa
text
text-metrics
transformers
universum
uri-encode
vector
];
libraryToolDepends
=
[
hpack
];
executableHaskellDepends
=
[
aeson
aeson-pretty
async
base
base-compat
base64-bytestring
bytestring
containers
cryptohash-sha1
directory
extra
filepath
fmt
getopt-generics
http-client
http-types
lucid
microlens-platform
monad-logger
process
servant
servant-client
servant-lucid
servant-server
servant-websockets
stm
template-haskell
text
time
tomland
universum
uuid
wai
wai-extra
warp
websockets
];
doHaddock
=
false
;
prePatch
=
"hpack"
;
homepage
=
"https://stuebinm.eu/git/walint"
;
license
=
"unknown"
;
hydraPlatforms
=
lib
.
platforms
.
none
;
};
haskellPackages
=
if
compiler
==
"default"
then
pkgs
.
haskellPackages
else
pkgs
.
haskell
.
packages
.
${
compiler
};
variant
=
if
doBenchmark
then
pkgs
.
haskell
.
lib
.
doBenchmark
else
pkgs
.
lib
.
id
;
drv
=
variant
(
haskellPackages
.
callPackage
f
{});
drvs
=
pkgs
.
haskell-nix
.
project
{
# 'cleanGit' cleans a source directory based on the files known by git
src
=
pkgs
.
haskell-nix
.
haskellLib
.
cleanGit
{
src
=
./.
;
name
=
"walint"
;
};
modules
=
[{
packages
.
walint
.
components
.
exes
=
{
# don't include gcc or ghc in the dependency closure …
walint-server
.
dontStrip
=
false
;
walint
.
dontStrip
=
false
;
};
}];
stack-sha256
=
"0bp3dwj2kl6n0swz5yf9kjy5ahp6i5qrnb39hkrsqgf0682i9nk1"
;
};
in
{
walint
=
drvs
.
walint
.
components
.
exes
.
walint
;
walint-server
=
pkgs
.
stdenvNoCC
.
mkDerivation
{
name
=
"walint-server-with-assets"
;
src
=
drvs
.
walint
.
components
.
exes
.
walint-mapserver
;
phases
=
[
"buildPhase"
];
buildPhase
=
''
mkdir -p $out
cp -r $src/* $out
cp -r
${
pkgs
.
copyPathToStore
./static
}
$out/static
cp
${
pkgs
.
copyPathToStore
./config.json
}
$out/config.json
cp
${
pkgs
.
copyPathToStore
./config.toml
}
$out/config.toml
''
;
};
}
drv
This diff is collapsed.
Click to expand it.
flake.lock
0 → 100644
+
27
−
0
View file @
f124e337
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1665466769,
"narHash": "sha256-L+qcHpb4Ac3PipMXJY/Ktbu1+KXy23WCZ8pXWmsf7zY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0b20bf89e0035b6d62ad58f9db8fdbc99c2b01e8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-22.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
This diff is collapsed.
Click to expand it.
flake.nix
0 → 100644
+
12
−
0
View file @
f124e337
{
description
=
"walint: workadventure map linting"
;
inputs
.
nixpkgs
.
url
=
"github:NixOS/nixpkgs/release-22.05"
;
outputs
=
{
self
,
nixpkgs
}:
{
defaultPackage
.
x86_64-linux
=
import
./default.nix
{
nixpkgs
=
import
nixpkgs
{
system
=
"x86_64-linux"
;
};
};
};
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment