aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-02-22 08:02:59 +0000
committerBlaž Hrastnik2021-02-22 08:02:59 +0000
commit41c0d5828fe301edf3bbc1dbd8fad7adf507e03e (patch)
tree6ebf9e75d179408b7c00b057b66ef2dd03fec575
parentdef949e509bb79c40a9e64fc34b91cc1830c0e41 (diff)
flake: Packaging definition.
-rw-r--r--Cargo.lock11
-rw-r--r--flake.lock50
-rw-r--r--flake.nix13
3 files changed, 51 insertions, 23 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 20d53d1a..125e7784 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -199,7 +199,6 @@ dependencies = [
"libc",
"num-integer",
"num-traits",
- "time",
"winapi",
]
@@ -1266,16 +1265,6 @@ dependencies = [
]
[[package]]
-name = "time"
-version = "0.1.43"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
-dependencies = [
- "libc",
- "winapi",
-]
-
-[[package]]
name = "tinyvec"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/flake.lock b/flake.lock
index 56f6e0bc..e96299cd 100644
--- a/flake.lock
+++ b/flake.lock
@@ -30,13 +30,44 @@
"type": "github"
}
},
+ "naersk": {
+ "inputs": {
+ "nixpkgs": "nixpkgs"
+ },
+ "locked": {
+ "lastModified": 1613655351,
+ "narHash": "sha256-BLBnt3BYsh92qKgqZljckM9s5sZUt30cBQF5b/5pVCU=",
+ "owner": "nmattia",
+ "repo": "naersk",
+ "rev": "1a9e5ddc51bc44c1bf872e02fe2702dc40e8af48",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nmattia",
+ "repo": "naersk",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
- "lastModified": 1612996220,
- "narHash": "sha256-l2kzWXxL3vXr8VxUzRtORPJS0nFQ3E5kBPF/AYAK0wI=",
+ "lastModified": 1613917044,
+ "narHash": "sha256-YvBBwtvrnove51SXQ67OVQHctYjEEpFu6GEzRe0pp5I=",
+ "path": "/nix/store/8mfw3h418igbhn3kh2fglr3nm96x3117-source",
+ "rev": "aed173ff9707387b238c1c7e143152ca9d8878e9",
+ "type": "path"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
+ "lastModified": 1613761605,
+ "narHash": "sha256-lUF6UPR96ZzQC0faNXBHLoLhNAdxZqYqDwz0PaIZ/7Y=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "758b29b5a28b818e311ad540637a5c1e40867489",
+ "rev": "9816b99e71c3504b0b4c1f8b2e004148460029d4",
"type": "github"
},
"original": {
@@ -46,7 +77,7 @@
"type": "github"
}
},
- "nixpkgs_2": {
+ "nixpkgs_3": {
"locked": {
"lastModified": 1609079092,
"narHash": "sha256-KhyKfxBHtZlAgudpZ0EJVzeuqROjKfVOwj8j0cuhU50=",
@@ -62,21 +93,22 @@
"root": {
"inputs": {
"flake-utils": "flake-utils",
- "nixpkgs": "nixpkgs",
+ "naersk": "naersk",
+ "nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils_2",
- "nixpkgs": "nixpkgs_2"
+ "nixpkgs": "nixpkgs_3"
},
"locked": {
- "lastModified": 1613096734,
- "narHash": "sha256-ttHv5tlL8JGn26V2xMQMjNy5Om6WKN1RhB2OxXhF4rY=",
+ "lastModified": 1613960870,
+ "narHash": "sha256-SvBexW2AGCaiNGXVaQ/6f31vSttrJs1K8VVVhuvkXeA=",
"owner": "oxalica",
"repo": "rust-overlay",
- "rev": "0ae7d76e9f72ef5c225710946c79c50a9eafe2f9",
+ "rev": "455f57703929bb5dc6e965cc6933c0e6f005a236",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 39e4683f..e61c878c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -5,15 +5,22 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
+ naersk.url = "github:nmattia/naersk";
};
- outputs = inputs@{ self, nixpkgs, rust-overlay, flake-utils, ... }:
+ outputs = inputs@{ self, nixpkgs, naersk, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ rust-overlay.overlay ]; };
+ naerskLib = pkgs.callPackage naersk {
+ inherit (pkgs.rust-bin.nightly.latest) rustc cargo;
+ };
in rec {
- # packages.helix = pkgs.callPackage ./default.nix {};
- # defaultPackage = packages.helix;
+ packages.helix = naerskLib.buildPackage {
+ pname = "helix";
+ root = ./.;
+ };
+ defaultPackage = packages.helix;
devShell = pkgs.callPackage ./shell.nix {};
});
}