flake: Packaging definition.

pull/8/head
Blaž Hrastnik 4 years ago
parent def949e509
commit 41c0d5828f

11
Cargo.lock generated

@ -199,7 +199,6 @@ dependencies = [
"libc", "libc",
"num-integer", "num-integer",
"num-traits", "num-traits",
"time",
"winapi", "winapi",
] ]
@ -1265,16 +1264,6 @@ dependencies = [
"once_cell", "once_cell",
] ]
[[package]]
name = "time"
version = "0.1.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
dependencies = [
"libc",
"winapi",
]
[[package]] [[package]]
name = "tinyvec" name = "tinyvec"
version = "1.1.1" version = "1.1.1"

@ -30,13 +30,44 @@
"type": "github" "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1612996220, "lastModified": 1613917044,
"narHash": "sha256-l2kzWXxL3vXr8VxUzRtORPJS0nFQ3E5kBPF/AYAK0wI=", "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", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "758b29b5a28b818e311ad540637a5c1e40867489", "rev": "9816b99e71c3504b0b4c1f8b2e004148460029d4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -46,7 +77,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1609079092, "lastModified": 1609079092,
"narHash": "sha256-KhyKfxBHtZlAgudpZ0EJVzeuqROjKfVOwj8j0cuhU50=", "narHash": "sha256-KhyKfxBHtZlAgudpZ0EJVzeuqROjKfVOwj8j0cuhU50=",
@ -62,21 +93,22 @@
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs", "naersk": "naersk",
"nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
} }
}, },
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1613096734, "lastModified": 1613960870,
"narHash": "sha256-ttHv5tlL8JGn26V2xMQMjNy5Om6WKN1RhB2OxXhF4rY=", "narHash": "sha256-SvBexW2AGCaiNGXVaQ/6f31vSttrJs1K8VVVhuvkXeA=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "0ae7d76e9f72ef5c225710946c79c50a9eafe2f9", "rev": "455f57703929bb5dc6e965cc6933c0e6f005a236",
"type": "github" "type": "github"
}, },
"original": { "original": {

@ -5,15 +5,22 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay"; 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: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = import nixpkgs { inherit system; overlays = [ rust-overlay.overlay ]; }; pkgs = import nixpkgs { inherit system; overlays = [ rust-overlay.overlay ]; };
naerskLib = pkgs.callPackage naersk {
inherit (pkgs.rust-bin.nightly.latest) rustc cargo;
};
in rec { in rec {
# packages.helix = pkgs.callPackage ./default.nix {}; packages.helix = naerskLib.buildPackage {
# defaultPackage = packages.helix; pname = "helix";
root = ./.;
};
defaultPackage = packages.helix;
devShell = pkgs.callPackage ./shell.nix {}; devShell = pkgs.callPackage ./shell.nix {};
}); });
} }

Loading…
Cancel
Save