feat: devShell, package as flake etc
Signed-off-by: Christina Sørensen <ces@fem.gg>
This commit is contained in:
parent
ec5c4e2bc7
commit
196aeaf6f5
10 changed files with 2127 additions and 0 deletions
.direnv
bin
flake-inputs
80figiaxaxbij9dvaapawdpscd9bcgpd-sourcebzhc7rpaymqkzrpbpczyzhwvdbgh7cf1-sourcewshnc0kqk1qz7iffb1yqri8a5cy6v7w5-sourcey082x32a6ylpai5lp1x4vcpj39gya83h-source
flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfaflake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc
19
.direnv/bin/nix-direnv-reload
Executable file
19
.direnv/bin/nix-direnv-reload
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
if [[ ! -d "/home/ces/org/src/git/qcode-drills" ]]; then
|
||||
echo "Cannot find source directory; Did you move it?"
|
||||
echo "(Looking for "/home/ces/org/src/git/qcode-drills")"
|
||||
echo 'Cannot force reload with this script - use "direnv reload" manually and then try again'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# rebuild the cache forcefully
|
||||
_nix_direnv_force_reload=1 direnv exec "/home/ces/org/src/git/qcode-drills" true
|
||||
|
||||
# Update the mtime for .envrc.
|
||||
# This will cause direnv to reload again - but without re-building.
|
||||
touch "/home/ces/org/src/git/qcode-drills/.envrc"
|
||||
|
||||
# Also update the timestamp of whatever profile_rc we have.
|
||||
# This makes sure that we know we are up to date.
|
||||
touch -r "/home/ces/org/src/git/qcode-drills/.envrc" "/home/ces/org/src/git/qcode-drills/.direnv"/*.rc
|
1
.direnv/flake-inputs/80figiaxaxbij9dvaapawdpscd9bcgpd-source
Symbolic link
1
.direnv/flake-inputs/80figiaxaxbij9dvaapawdpscd9bcgpd-source
Symbolic link
|
@ -0,0 +1 @@
|
|||
/nix/store/80figiaxaxbij9dvaapawdpscd9bcgpd-source
|
1
.direnv/flake-inputs/bzhc7rpaymqkzrpbpczyzhwvdbgh7cf1-source
Symbolic link
1
.direnv/flake-inputs/bzhc7rpaymqkzrpbpczyzhwvdbgh7cf1-source
Symbolic link
|
@ -0,0 +1 @@
|
|||
/nix/store/bzhc7rpaymqkzrpbpczyzhwvdbgh7cf1-source
|
1
.direnv/flake-inputs/wshnc0kqk1qz7iffb1yqri8a5cy6v7w5-source
Symbolic link
1
.direnv/flake-inputs/wshnc0kqk1qz7iffb1yqri8a5cy6v7w5-source
Symbolic link
|
@ -0,0 +1 @@
|
|||
/nix/store/wshnc0kqk1qz7iffb1yqri8a5cy6v7w5-source
|
1
.direnv/flake-inputs/y082x32a6ylpai5lp1x4vcpj39gya83h-source
Symbolic link
1
.direnv/flake-inputs/y082x32a6ylpai5lp1x4vcpj39gya83h-source
Symbolic link
|
@ -0,0 +1 @@
|
|||
/nix/store/y082x32a6ylpai5lp1x4vcpj39gya83h-source
|
1
.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa
Symbolic link
1
.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa
Symbolic link
|
@ -0,0 +1 @@
|
|||
/nix/store/qwmvgrk86nbz091kf2nyswdbrb22jf15-nix-shell-env
|
2006
.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc
Normal file
2006
.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc
Normal file
File diff suppressed because it is too large
Load diff
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake .
|
58
flake.lock
generated
Normal file
58
flake.lock
generated
Normal file
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736143030,
|
||||
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1737885589,
|
||||
"narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1735774519,
|
||||
"narHash": "sha256-CewEm1o2eVAnoqb6Ml+Qi9Gg/EfNAxbRx1lANGVyoLI=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
38
flake.nix
Normal file
38
flake.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
description = "Q-CODE Training Script, for the hammies";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
perSystem =
|
||||
{
|
||||
self',
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
packages.default = pkgs.writeShellApplication {
|
||||
name = "qcode-trainer";
|
||||
runtimeInputs = with pkgs; [
|
||||
jq
|
||||
figlet
|
||||
];
|
||||
text = ./bin/qcode.bash;
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = [ self'.packages.default ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue