-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
50 lines (42 loc) · 815 Bytes
/
Copy pathflake.nix
File metadata and controls
50 lines (42 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
description = "Swallow Stars";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
# Aliases
m = pkgs.writeShellScriptBin "m" ''
#!${pkgs.bash}/bin/bash
make
'';
c = pkgs.writeShellScriptBin "c" ''
#!${pkgs.bash}/bin/bash
make clean
'';
run = pkgs.writeShellScriptBin "run" ''
#!${pkgs.bash}/bin/bash
./swallow-stars
'';
a = pkgs.writeShellScriptBin "a" ''
#!${pkgs.bash}/bin/bash
if [ -f ./swallow-stars ]; then
make clean;
make;
else
make;
fi
./swallow-stars
'';
in
{
devShells.x86_64-linux.default = pkgs.mkShell {
buildInputs = with pkgs; [
gcc gnumake ncurses # clang-tools
# Aliases
m c run a
];
};
};
}