From dc6e17b86f0026db86f6ec25c4df63ac497b9303 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Wed, 15 Sep 2021 10:03:29 -0700 Subject: flake: replace naersk with buildRustPackage --- flake.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 03f4a25..ccbab81 100644 --- a/flake.nix +++ b/flake.nix @@ -8,10 +8,6 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - naersk = { - url = "github:nmattia/naersk/master"; - inputs.nixpkgs.follows = "nixpkgs"; - }; utils.url = "github:numtide/flake-utils"; flake-compat = { url = "github:edolstra/flake-compat"; @@ -19,11 +15,10 @@ }; }; - outputs = { self, nixpkgs, utils, naersk, ... }: + outputs = { self, nixpkgs, utils, ... }: { overlay = final: prev: let - naersk-lib = final.callPackage naersk { }; system = final.system; isDarwin = final.lib.strings.hasSuffix "-darwin" system; darwinOptions = final.lib.optionalAttrs isDarwin { @@ -35,8 +30,13 @@ { deploy-rs = { - deploy-rs = naersk-lib.buildPackage (darwinOptions // { - root = ./.; + deploy-rs = final.rustPlatform.buildRustPackage (darwinOptions // { + pname = "deploy-rs"; + version = "0.1.0"; + + src = ./.; + + cargoLock.lockFile = ./Cargo.lock; }) // { meta.description = "A Simple multi-profile Nix-flake deploy tool"; }; lib = rec { -- cgit v1.2.3