diff options
author | V <v@unfathomable.blue> | 2021-08-14 03:10:08 +0200 |
---|---|---|
committer | V <v@unfathomable.blue> | 2021-08-14 04:03:46 +0200 |
commit | dcae0f9c8a94f05bf55cf9b6fbc773502ab5784f (patch) | |
tree | f90046544ae955e684f9ffa957c1f43cc5b4e6c5 | |
parent | 3b4eaeaf282af63a4a1a16e13a5d4d4a2ffea910 (diff) | |
download | unf-legacy-dcae0f9c8a94f05bf55cf9b6fbc773502ab5784f.tar.zst |
ripple/nix: build everything with naersk
Yes, it really is that simple. Naersk is great! Change-Id: I183f5bd0d2547a368f32bbc42fddf03e7cb03331
-rw-r--r-- | ripple/default.nix | 6 | ||||
-rw-r--r-- | ripple/nix/default.nix | 3 | ||||
-rw-r--r-- | ripple/nix/sources.json | 12 |
3 files changed, 21 insertions, 0 deletions
diff --git a/ripple/default.nix b/ripple/default.nix new file mode 100644 index 0000000..7596f5c --- /dev/null +++ b/ripple/default.nix @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: V <v@unfathomable.blue> +# SPDX-License-Identifier: OSL-3.0 + +with import ./nix; + +naersk.buildPackage ./. diff --git a/ripple/nix/default.nix b/ripple/nix/default.nix index cf4273b..590aec6 100644 --- a/ripple/nix/default.nix +++ b/ripple/nix/default.nix @@ -5,6 +5,9 @@ let sources = import ./sources.nix {}; in import sources.nixpkgs { overlays = [ (final: prev: { + # This was not available in nixpkgs at the time of writing. + naersk = final.callPackage sources.naersk {}; + rustfmt = prev.rustfmt.overrideAttrs ({ patches ? [], ... }: { patches = patches ++ [ # Adds an option variant that merges all use statements into a single block. diff --git a/ripple/nix/sources.json b/ripple/nix/sources.json index 70b7591..b7b99be 100644 --- a/ripple/nix/sources.json +++ b/ripple/nix/sources.json @@ -1,4 +1,16 @@ { + "naersk": { + "branch": "master", + "description": "Build rust crates in Nix. No configuration, no code generation, no IFD. Sandbox friendly. [maintainer: @nmattia]", + "homepage": "", + "owner": "nix-community", + "repo": "naersk", + "rev": "e09c320446c5c2516d430803f7b19f5833781337", + "sha256": "0k1pk2ixnxl6njjrgy750gm6m1nkkdsah383n3wp4ybrzacnav5h", + "type": "tarball", + "url": "https://github.com/nix-community/naersk/archive/e09c320446c5c2516d430803f7b19f5833781337.tar.gz", + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + }, "nixpkgs": { "branch": "nixos-unstable", "description": "Nix Packages collection", |