Skip to content

Commit 1025911

Browse files
committed
Add Nix support
1 parent f607ddc commit 1025911

4 files changed

Lines changed: 176 additions & 0 deletions

File tree

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/target
22
.env
3+
.direnv/
34
sso_login/node_modules/
45
maconomy_cookie

flake.lock

Lines changed: 137 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
inputs = {
3+
naersk.url = "github:nix-community/naersk/master";
4+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
5+
utils.url = "github:numtide/flake-utils";
6+
};
7+
8+
outputs = { nixpkgs, utils, naersk, ... }:
9+
utils.lib.eachDefaultSystem (system:
10+
let
11+
pkgs = import nixpkgs { inherit system; };
12+
naersk-lib = pkgs.callPackage naersk { };
13+
in {
14+
defaultPackage = naersk-lib.buildPackage {
15+
src = ./.;
16+
# The binary is called `maconomy`, not `maconomy-cli`
17+
pname = "maconomy";
18+
};
19+
devShell = with pkgs;
20+
mkShell {
21+
buildInputs = [
22+
# Rust stuff
23+
cargo
24+
rustc
25+
rustfmt
26+
pre-commit
27+
rustPackages.clippy
28+
29+
# Other
30+
openssl
31+
pkg-config
32+
chromium
33+
];
34+
RUST_SRC_PATH = rustPlatform.rustLibSrc;
35+
};
36+
});
37+
}

0 commit comments

Comments
 (0)