diff options
author | Emile <git@emile.space> | 2023-07-16 01:40:53 +0200 |
---|---|---|
committer | Emile <git@emile.space> | 2023-07-16 01:40:53 +0200 |
commit | ecf63cba476057a71bf4b45d5ba5f83ef39f56b8 (patch) | |
tree | a003ed4aca701128b5c2576c640452b4ed3e188f /flake.nix |
initial commit
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..bc3308a --- /dev/null +++ b/flake.nix @@ -0,0 +1,44 @@ +{ + inputs = { + flake-utils.url = "github:numtide/flake-utils"; + naersk.url = "github:nix-community/naersk"; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + }; + + outputs = { self, flake-utils, naersk, nixpkgs }: + let + pkgs = (import nixpkgs) { + system = "x86_64-linux"; + }; + + naersk' = pkgs.callPackage naersk {}; + + in rec { + packages."x86_64-linux".r2wars-rs = naersk'.buildPackage { + src = ./.; + + meta = with pkgs.lib; { + description = "yet another r2wars implementation"; + homepage = "https://git.emile.space/hanemile/r2wars-rs"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ + hanemile + ]; + }; + }; + + # For `nix build` & `nix run`: + defaultPackage = packages."x86_64-linux".r2wars-rs; + + # For `nix develop` (optional, can be skipped): + devShell = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ rustc cargo ]; + }; + + # hydraJobs."<attr>"."<system>" = derivation; + hydraJobs = { + build."x86_64-linux" = packages."x86_64-linux".r2wars-r2; + }; + }; +} \ No newline at end of file |