nix: remove mozillaOverlay, use stable rust
This commit is contained in:
parent
931cea5968
commit
650d41b39f
53
default.nix
53
default.nix
|
@ -1,53 +1,22 @@
|
||||||
{ mozillaOverlay ? import <mozillaOverlay>,
|
{ pkgs ? import <nixpkgs> {},
|
||||||
rustManifest ? ./channel-rust-nightly.toml,
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = import <nixpkgs> { overlays = [ mozillaOverlay ]; };
|
cargoSha256 = "11hvxh8drqpimax7b5z5r8qiwzy00j5r0xdshml0wgzxnmrnxzqc";
|
||||||
in
|
|
||||||
|
|
||||||
with pkgs;
|
build = pname: pkgs.rustPlatform.buildRustPackage {
|
||||||
|
inherit pname;
|
||||||
let
|
version = "0.1.0";
|
||||||
rustChannelOfTargets = _channel: _date:
|
|
||||||
(pkgs.lib.rustLib.fromManifestFile rustManifest {
|
|
||||||
inherit (pkgs) stdenv fetchurl patchelf;
|
|
||||||
}).rust;
|
|
||||||
rust =
|
|
||||||
rustChannelOfTargets "nightly" null;
|
|
||||||
rustPlatform = pkgs.recurseIntoAttrs (pkgs.makeRustPlatform {
|
|
||||||
rustc = rust;
|
|
||||||
cargo = rust;
|
|
||||||
});
|
|
||||||
|
|
||||||
cargoSha256 = "0jbpwr84ncfj5nigznr06fpwaj89n839534n81hqwacflh1z43ix";
|
|
||||||
|
|
||||||
ticker-update = rustPlatform.buildRustPackage {
|
|
||||||
name = "ticker-update";
|
|
||||||
src = ./.;
|
src = ./.;
|
||||||
buildInputs = [
|
buildInputs = with pkgs; [
|
||||||
pkg-config openssl postgresql.lib
|
pkg-config openssl
|
||||||
rust
|
postgresql.lib
|
||||||
];
|
];
|
||||||
preBuild = "pushd ticker-update";
|
preBuild = "pushd ${pname}";
|
||||||
postBuild = "popd";
|
|
||||||
inherit cargoSha256;
|
|
||||||
};
|
|
||||||
|
|
||||||
ticker-serve = rustPlatform.buildRustPackage {
|
|
||||||
name = "ticker-serve";
|
|
||||||
src = ./.;
|
|
||||||
buildInputs = [
|
|
||||||
pkg-config openssl postgresql.lib
|
|
||||||
rust
|
|
||||||
];
|
|
||||||
preBuild = "pushd ticker-serve";
|
|
||||||
postBuild = "popd";
|
postBuild = "popd";
|
||||||
inherit cargoSha256;
|
inherit cargoSha256;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
inherit
|
ticker-update = build "ticker-update";
|
||||||
rustPlatform
|
ticker-serve = build "ticker-serve";
|
||||||
ticker-update
|
|
||||||
ticker-serve;
|
|
||||||
}
|
}
|
||||||
|
|
10
shell.nix
10
shell.nix
|
@ -1,15 +1,15 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
|
|
||||||
with pkgs;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
default = import ./default.nix {};
|
default = import ./default.nix { inherit pkgs; };
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
name = "env";
|
name = "env";
|
||||||
buildInputs =
|
buildInputs =
|
||||||
default.ticker-update.buildInputs;
|
[ pkgs.rustPlatform.rust.cargo ] ++
|
||||||
|
default.ticker-update.buildInputs ++
|
||||||
|
default.ticker-serve.buildInputs;
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
echo "Run 'cargo build --release'"
|
echo "Run 'cargo build --release'"
|
||||||
|
|
Loading…
Reference in New Issue