diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..6268b4f --- /dev/null +++ b/flake.lock @@ -0,0 +1,69 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1665296151, + "narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "14ccaaedd95a488dd7ae142757884d8e125b3363", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": [ + "rust-overlay", + "flake-utils" + ], + "nixpkgs": [ + "rust-overlay", + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1677119371, + "narHash": "sha256-L0Da4eKzDZrsy8ysOS1lhgDjAgEqGvYGf/lXaRd5/YQ=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "c67c79ea25664d66e74ae91a6fa0d6c65d12d3a7", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..44059c6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + description = "All kinds of stuff"; + + inputs = { + rust-overlay.url = "github:oxalica/rust-overlay"; + flake-utils.follows = "rust-overlay/flake-utils"; + nixpkgs.follows = "rust-overlay/nixpkgs"; + }; + + outputs = inputs@{nixpkgs, flake-utils, ...}: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [ + inputs.rust-overlay.overlays.default + ]; + }; + in + { + packages.onomap = pkgs.haskellPackages.callCabal2nix "onomap" ./onomastics-ng {}; + packages.rusty-jeep = pkgs.rustPlatform.buildRustPackage rec { + name = "rusty-jeep"; + version = "1.0.0"; + src = ./rusty-jeep; + nativeBuildInputs = [pkgs.pkg-config]; + buildInputs = [pkgs.alsa-lib]; + cargoHash = "sha256-3Zuh22qGSIhyOnwoZqpf3eio5l2q9u6XTUpiCBnAHrA="; + meta = with nixpkgs.lib; { + description = "A beeping program inspired by K_belwagen"; + license = licenses.wtfpl; + maintainers = [maintainers.kmein]; + }; + }; + }); +}