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>,
|
||||
rustManifest ? ./channel-rust-nightly.toml,
|
||||
{ pkgs ? import <nixpkgs> {},
|
||||
}:
|
||||
|
||||
let
|
||||
pkgs = import <nixpkgs> { overlays = [ mozillaOverlay ]; };
|
||||
in
|
||||
cargoSha256 = "11hvxh8drqpimax7b5z5r8qiwzy00j5r0xdshml0wgzxnmrnxzqc";
|
||||
|
||||
with pkgs;
|
||||
|
||||
let
|
||||
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";
|
||||
build = pname: pkgs.rustPlatform.buildRustPackage {
|
||||
inherit pname;
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
buildInputs = [
|
||||
pkg-config openssl postgresql.lib
|
||||
rust
|
||||
buildInputs = with pkgs; [
|
||||
pkg-config openssl
|
||||
postgresql.lib
|
||||
];
|
||||
preBuild = "pushd ticker-update";
|
||||
postBuild = "popd";
|
||||
inherit cargoSha256;
|
||||
};
|
||||
|
||||
ticker-serve = rustPlatform.buildRustPackage {
|
||||
name = "ticker-serve";
|
||||
src = ./.;
|
||||
buildInputs = [
|
||||
pkg-config openssl postgresql.lib
|
||||
rust
|
||||
];
|
||||
preBuild = "pushd ticker-serve";
|
||||
preBuild = "pushd ${pname}";
|
||||
postBuild = "popd";
|
||||
inherit cargoSha256;
|
||||
};
|
||||
in {
|
||||
inherit
|
||||
rustPlatform
|
||||
ticker-update
|
||||
ticker-serve;
|
||||
ticker-update = build "ticker-update";
|
||||
ticker-serve = build "ticker-serve";
|
||||
}
|
||||
|
|
10
shell.nix
10
shell.nix
|
@ -1,15 +1,15 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
let
|
||||
default = import ./default.nix {};
|
||||
default = import ./default.nix { inherit pkgs; };
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "env";
|
||||
buildInputs =
|
||||
default.ticker-update.buildInputs;
|
||||
[ pkgs.rustPlatform.rust.cargo ] ++
|
||||
default.ticker-update.buildInputs ++
|
||||
default.ticker-serve.buildInputs;
|
||||
|
||||
shellHook = ''
|
||||
echo "Run 'cargo build --release'"
|
||||
|
|
Loading…
Reference in New Issue