about summary refs log tree commit diff
path: root/pkgs
Commit message (Collapse)AuthorAgeFilesLines
* pkgs/profpatsch/nman: add man page for nmansternenseemann2021-02-252-0/+197
| | | | Proof-reading would be very welcome!
* pkgs/profpatsch/nman: fix panic if mandir.len() < 3sternenseemann2021-02-251-1/+1
| | | | | | | | | | | | | Sometimes share/man contains directories that are not of the form man<section> which we are checking in build_man_page. However, this check can't deal with directories that are shorter than 3 characters due to the use of split_at() which panics if the index is out of range (for somer reason…). In nixpkgs it is relatively common to have directories like "de" in share/man. This has been resolved.
* pkgs/profpatsch/nman: repurpose old path field in DrvWithOutputsternenseemann2021-02-251-6/+8
| | | | | | | | | The path field wasn't used in DrvWithOutput as we only ever needed rendered. rendered however is a bit of a confusing name as it is not in fact fully rendered in all cases. Since we can pass rendered to nix-store --realise without preprocessing in all cases we rename it to path and add a note in the documentation. The old path field is removed for this without replacement.
* pkgs/profpatsch/nman: move parse_drv_* into implssternenseemann2021-02-251-34/+38
| | | | | * parse_drv_output → DrvOutput::parse * parse_drv_path → DrvWithOutput::parse
* pkgs/profpatsch/nman: document code furthersternenseemann2021-02-251-0/+54
|
* pkgs/profpatsch/nman: if no section is given, treat it as unknownsternenseemann2021-02-251-37/+67
| | | | | | | | | | | | | | | Previously, we would always assume section 1 was requested if no section was given on the command line. Now the section is treated as if it was unknown and we search for a matching man page by looking through the sub directories of $output/share/man. This means the following invokation works as expected: nman libunwind unw_getcontext instead of requiring nman libunwind 3 unw_getcontext
* pkgs/profpatsch/nman: use pkgs.sternenseemann.temp for TempDirsternenseemann2021-02-253-44/+15
| | | | | temp is essentially the old TempDir code from nman, but using libc's mkdtemp(3) directly instead of mktemp(1) and a slightly better API.
* pkgs/profpatsch/nman: print context for common error messagessternenseemann2021-02-251-34/+43
| | | | | Most notably stderr produced by nix-instantiate and nix-store will now be printed on an error.
* pkgs/profpatsch/nman: reduce and unify exit codessternenseemann2021-02-251-7/+9
|
* pkgs/profpatsch/nman: mutate PathBuf directly instead of using .join()sternenseemann2021-02-251-5/+4
| | | | Should save on copying a bit.
* pkgs/profpatsch/nman: print errors to stderrsternenseemann2021-02-251-4/+2
|
* pkgs/profpatsch/nman: prefer out over docsternenseemann2021-02-251-1/+1
| | | | | | | | man pages are usually pretty small and therefore often also included in out whereas doc seems to seldomly contain any man pages. TODO: confirm this and get a better overview over man pages in doc outputs
* pkgs/profpatsch/nman: check for newline before trimmingsternenseemann2021-02-251-1/+4
|
* pkgs/profpatsch/nman: don't realise all build outputs for `out`sternenseemann2021-02-251-5/+15
| | | | | | | | | | | | | | | nix-instantiate unfortunately prints the plain .drv path for <attr>.out wheras it prints <name>.drv!<output> for all non-default outputs. If we realise the plain .drv path, _all_ outputs are realised which is not desireable since we may not need extra store path being created by this, e. g. for a derivation with outputs = [ "out" "lib" "dev" ] we only need to realise "out" if the man pages are located in there, saving a bit of time and disk space. We implement this better behavior by adding the render function to DrvWithOutput which converts a DrvWithOutput (at the cost of copying) to an OsString. If the output is out, "!out" is appended to the path meaning nix-store will only realise the default output.
* pkgs/profpatsch/nman: distinguish between failed and missing cmdssternenseemann2021-02-251-4/+7
|
* pkgs/profpatsch/nman: refactor exit code handling, print error messagessternenseemann2021-02-251-12/+30
| | | | | | * make exit code determination nicer syntactically by using an impl * add .msg() function which returns an appropriate error message for every error type.
* pkgs/profpatsch/nman: fix building of default outputsternenseemann2021-02-251-5/+9
| | | | | | | | | | Unfortunately, nix-instantiate prints only the drv path for the `out` output which causes nix-store to realise all drv outputs. This of course breaks build_man_page since it expects the output to be just one path. We fix this (for now) by using split(). Ideally we would use <drv_path>!out for realising the default output which only builds the output we need. However this is a bit annoying to solve since it means we have to allocate a bit of memory.
* pkgs/profpatsch/nman: initial rewrite in ruststernenseemann2021-02-254-150/+293
| | | | | | | | | | | | | | | | | | | | | | This is a complete and user interface compatible rewrite of nman.go in Rust which aleviates a few flaws of the previous implementation: * Garbage collector roots for both the derivation and the build outputs are created in a temporary directory which is cleaned afterwards. This prevents a race condition between nman and nix-store --gc and doesn't pollute the user's working directory. * Instead of building just one build output, nman now checks every output for the requested man page which fixes nman for derivations which have their man pages split between multiple outputs, e. g. man and devman. Future work: * Improve error messages reported to the user * Man page * Implement man page search heuristics if no section is specified: Instead of falling back to section 1, all sections should be checked for the desired page (in an ascending order?)
* pkgs/sternenseemann/vuizvui-update-programs-sqlite: automaticallly commitsternenseemann2021-02-221-1/+13
| | | | | | Another convenience feature you'd want virtually always want is to automatically commit the changed release.nix which is added in this commit.
* pkgs/sternenseemann: add update script for programs.sqlitesternenseemann2021-02-192-0/+118
| | | | | | | | | | | | This script downloads the latest nixos-unstable nixexprs.tar.xz, extracts programs.sqlite, figures out its hash and updates version and hash in the given release.nix. Accessible as pkgs.sternenseemann.vuizvui-update-programs-sqlite for a lack of a better place to put it. Maybe we should add something? build-support doesn't feel right. Future work: run this automatically once in a while via GitHub actions.
* pkgs/sternenseemann/temp: test using testRustSimplesternenseemann2021-02-142-14/+10
| | | | | This means we don't need the -common machinery anymore and can remove the -tests attribute altogether.
* pkgs/profpatsch: vendor testRustSimple from tvlsternenseemann2021-02-142-3/+30
| | | | | | | testRustSimple builds and runs the tests of a buildRustCrate derivation automatically using drvSeqL, returning its non-test variant. Really looking forward to pkgs.tvl :)
* pkgs/sternenseemann/temp: add tiny temporary file/dir cratesternenseemann2021-02-133-0/+226
| | | | | | | | | | | | | The crate implements a safe wrapper around mkdtemp(3) and mkstemp(3) which provide decent temporary file and directory creation. The key feature we provide is that we wrap the resulting path in a TempFile / TempDir struct. This allows us to implement the Drop trait such that the temporary directory / file is automatically deleted when the value goes out of scope in Rust which saves the programmer from cleaning up temporary artifacts themselves. The API is indeed very tiny currently, only implementing creation and AsRef<Path> which should allow all necessary path / file manipulation.
* feat(pkgs/profpatsch): add backup scriptProfpatsch2021-02-132-0/+155
| | | | | | Small wrapper around duplicity to restore/create my backups with. The legosi backup is created by `services.duplicity`, but can be restored from the script via the read-only application key.
* feat(pkgs/profpatsch/deploy): use substitutes on remoteProfpatsch2021-02-131-2/+6
|
* pkgs/sternenseemann: unvendor fetchcvssternenseemann2021-02-113-52/+1
| | | | | | nixpkgs-unstable has advanced enough that the fetchcvs fix is now available via that channel, so our hydra won't choke on this derivation with the upstream fetchcvs.
* Revert "modules/user/sternenseemann/sway: fix startup by enabling opengl"sternenseemann2021-02-113-40/+14
| | | | | | This reverts commit 5bd756eaf27882820cb59e0ecf9c305f08b3b3e3. Committed more than I meant to.
* modules/user/sternenseemann/sway: fix startup by enabling openglsternenseemann2021-02-113-14/+40
| | | | | | sway needs opengl driver's to be enabled and loadable in order to start. I previously didn't notice this oversight as I still had them loaded and did not reboot after the rebuild.
* pkgs/sternenseemann/mandoc: initsternenseemann2021-02-094-0/+143
| | | | | | | | | | | | | Build mandoc from cvs and apply a patch which adds an exception for the checks does makewhatis(8): with this the realpaths of man pages to be indexed may be symlinks referring to files outside of the root man directory if they are located in /nix/store. This allows indexing /run/current-system/sw/share/man using mandoc's makewhatis(8). Since fetchcvs is currently broken in nixos-unstable we vendor in the fixed variant from nixpkgs master until the channel has advanced.
* pkgs/profpatsch/utils-hs: update to f53264978042d8041831a3ac3766aa1dfdc60b57sternenseemann2021-02-071-2/+2
| | | | | This fixes the build of pkgs.profpatsch.watch-server, it was likely only forgotten to update the revision in vuizvui.
* */sternenseemann: make TODOs more greppablesternenseemann2021-02-071-1/+1
| | | | machines/sternenseemann: add TODO list
* pkgs/sternenseemann/lib: init with mapAttrsByAttrssternenseemann2021-02-072-0/+80
|
* pkgs/sternenseemann/scripts: initsternenseemann2021-02-062-2/+229
|
* pkgs/sternenseemann/texlive: initsternenseemann2021-02-061-0/+7
| | | | sterni's personal texlive.combine { ... }
* pkgs/sternenseemann/pass: initsternenseemann2021-02-062-1/+73
| | | | sterni's patched pass with passmenu
* pkgs/sternenseemann/unicode_clock: init at 0.1sternenseemann2021-02-062-0/+24
|
* pkgs/sternenseemann/shakti: init at 2021-01-29sternenseemann2021-02-062-0/+37
|
* pkgs/sternenseemann/t: init at unstable-2020-04-11sternenseemann2021-02-062-0/+22
|
* pkgs/sternenseemann/tep: initsternenseemann2021-02-066-2/+223
| | | | pkgs/sternenseemann/emoji-generic: init at unstable-2020-11-22
* pkgs/openlab: remove gititProfpatsch2021-02-052-19/+0
| | | | | We originally needed it here to deploy it on the machine, but it’s set up manually via the gitit repo default.nix for the time being.
* treewide: stdenv.lib -> pkgs.libProfpatsch2021-02-0524-61/+61
| | | | Upstream is deprecating `stdenv.lib`, so let’s do the same.
* pkgs/profpatsch: add deployProfpatsch2021-02-052-0/+40
| | | | Small script to deploy my machines.
* pkgs/profpatsch: adjust exec stuff to new skalibsProfpatsch2021-02-054-14/+54
| | | | | | | | | | | skarnet thought it would be wise to completely change the skalibs exec function interface without any backwards compat, so here we are. Have to reverse the code a bit, because `xmexec0` is a recursive `#define` pointing to `xmexec0_af`. `record-get` gets a rust treatment, it doesn’t really need the C interface just to exec into prog.
* Revert "aszlig/gopass: Downgrade to version 1.9.2"aszlig2021-01-272-45/+12
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7b8164be35c9d82d6e7389a407150a9128f7fb0c. From the upstream changelog: > This is an important bugfix release that should resolve several > outstanding issues and concerns. Since 1.10.0 was released was engaged > in a lot of discussions and realized that compatibility is more > important than we first thought. So we're rolling back some breaking > changes and revise some parts of our roadmap. We will strive to remain > compatible with other password store implementations - but remember > this is a goal, not a promise. This means we'll continue using > compatible secrets formats as well as GPG and Git. As mentioned in the original commit, I'm still not entirely convinced that my use case has a future with gopass, their decision to roll back some of the breaking changes at least makes it possible for me to upgrade to the latest upstream version without the fear of being locked in into some gopass-specific format. Signed-off-by: aszlig <aszlig@nix.build>
* pkgs/profpatsch: add nix-evalProfpatsch2021-01-012-1/+7
| | | | Dumb wrapper around `nix-instantiate` for something I often need.
* pkgs/profpatsch: add nix-runProfpatsch2021-01-013-0/+40
| | | | | | | | | Small tool which takes a block of nix options that should produce a script to run, and then calls the script with the rest of argv e nix-run { -A foobar } a b c calls `nix-build -A foobar && ./result a b c`.
* machines/profpatsch/base-server: convert module to toml definitionProfpatsch2020-12-301-0/+119
| | | | | | | | | | This is a working PoC of specifying module configs as toml configuration with simple to understand semantics. Both the option definitions and the actual config values can be specified via the toml DSL. This is extremely happy-path for now, so errors are gonna be horrible.
* games: Add Factorioaszlig2020-12-304-0/+695
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been laying around since a few weeks but instead of just using a simple shell script wrapper (which I had in the first place), I decided to directly patch the binary during rC3. The main reason why I went this route was because in the long run we want to have a generic implementation we can use to patch all sorts of games, similar to what we have with monogame-patcher. So the way the *current* patcher roughly works is by allocating an area called "compost", which is then used as some kind of abstraction for allocating code and data to be used for the references/logic that we need to patch. The latter involves patching XDG_DATA_HOME into the game and changing the "/usr/share/factorio" path to use the ones within the store path ($out/share/factorio). Fortunately, Factorio already assumes that everything within /usr/share/factorio (or our path for that matter) is read-only, so we don't need to add extra code/conditions specifically to handle that. Patching both cases is made possible by patching a third location (get_executable_name), which tries to get the current executable path via several methods (using /proc/self/exe, running "ps", ...) at runtime, which in our case is really unnecessary and a perfect opportunity to replace the function logic by the hardcoded path and using the rest of the function for our compost area. While patching might sound straigtforward, I actually introduced two little (but hard to debug) bugs, where I'm very grateful to all those folks (you know who you are) at rC3 who were actually following along and provided helpful input. In the long term, the goal is to rewrite the patcher with more elaborate type information (eg. right now function/opcode information is raw JSON) and generalise it enough that we can use it to get rid of a few other wrappers. Signed-off-by: aszlig <aszlig@nix.build>
* pkgs/profpatsch/e: translate [ and ] to block boundariesProfpatsch2020-12-281-9/+20
| | | | | | | | | | | | | Since the goal of using `e` with argv is interactive execution of block-style commands from the command line, the use of { and } for blocks is sub-optimal, since bash (and ostensibly also fish) interpret them as metacharacters and assign some semantics. [ and ] on the other hand are not taken (apart from the `[` executable, which is only relevant in command position and can always be replaced by the `test` command). So we translate a stand-alone "[" argument to "{" and the same for "]"/"}", giving us a transparent block syntax.
* pkgs/profpatsch/e: allow passing a block-style argument as argvProfpatsch2020-12-281-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Often times I want to execute “block-style” programs directly, but it is rather inconvenient to type out `execlineb -c "…"` every time, plus -c wants the argv as a single string instead of an argv. The alternative, using the block representation with leading spaces, is even less ergonomic. So instead of execlineb -c "nix-run { -A pkgs.profpatsch.e ~/vuizvui } echo hello" or even nix-run ' -A' ' pkgs.profpatsch.e' ' /home/me/vuizvui' '' echo hello I can now write e nix-run { -A pkgs.profpatsch.e ~/vuizvui } echo hello and it will work as expected (provided your shell expands inside {} blocks, which bash does but fish doesn’t for some reason). If no argument is passed, e falls back to opening a shell prompt.