diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2024-05-27 16:04:31 -0700 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2024-05-27 16:04:31 -0700 |
| commit | 4debd88807c538aa430ce69b83fdb291f687b1b1 (patch) | |
| tree | 5def99861585367826937c2bdbbfba7f23e07f0b /flake.nix | |
| download | qc-4debd88807c538aa430ce69b83fdb291f687b1b1.tar.zst | |
Rewrite in Rust.
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d96ac0b --- /dev/null +++ b/flake.nix @@ -0,0 +1,26 @@ +{ + inputs = { + naersk.url = "github:nix-community/naersk/master"; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, utils, naersk }: + utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + deps = with pkgs; [ pkg-config graphene cairo gtk4 ]; + naersk-lib = pkgs.callPackage naersk {}; + in + { + defaultPackage = naersk-lib.buildPackage { + src = ./.; + nativeBuildInputs = deps; + }; + devShell = with pkgs; mkShell { + buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy ] ++ deps; + RUST_SRC_PATH = rustPlatform.rustLibSrc; + }; + } + ); +} |
