From dcae0f9c8a94f05bf55cf9b6fbc773502ab5784f Mon Sep 17 00:00:00 2001 From: V Date: Sat, 14 Aug 2021 03:10:08 +0200 Subject: ripple/nix: build everything with naersk Yes, it really is that simple. Naersk is great! Change-Id: I183f5bd0d2547a368f32bbc42fddf03e7cb03331 --- ripple/nix/default.nix | 3 +++ ripple/nix/sources.json | 12 ++++++++++++ 2 files changed, 15 insertions(+) (limited to 'ripple/nix') 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///archive/.tar.gz" + }, "nixpkgs": { "branch": "nixos-unstable", "description": "Nix Packages collection", -- cgit 1.4.1