{ callPackage, fetchgit, fetchFromGitHub, makeRustPlatform, stdenv, pkgs, ... }: let mkRustPlatform = { date, channel }: let mozillaOverlay = fetchFromGitHub { owner = "mozilla"; repo = "nixpkgs-mozilla"; rev = "5300241b41243cb8962fad284f0004afad187dad"; sha256 = "1h3g3817anicwa9705npssvkwhi876zijyyvv4c86qiklrkn5j9w"; }; mozilla = callPackage "${mozillaOverlay.out}/package-set.nix" {}; rustSpecific = (mozilla.rustChannelOf { inherit date channel; }).rust; in makeRustPlatform { cargo = rustSpecific; rustc = rustSpecific; }; in let rustPlatform = mkRustPlatform { date = "2020-01-15"; channel = "nightly"; }; in rustPlatform.buildRustPackage rec { pname = "pjournal"; version = "0.1.0"; # https://git.breakds.org/breakds/nixvital/src/branch/master/pkgs/simple-reflection-server/default.nix postInstall = '' mkdir $out/etc/ cp -r templates $out/etc cp -r static $out/etc wrapProgram "$out/bin/pjournal" \ --add-flags "--template-path $out/etc/templates" \ --add-flags "--static-path $out/etc/static" ''; preConfigure = '' export HOME=$(mktemp -d) ''; buildInputs = with pkgs; [ openssl pkgconfig postgresql makeWrapper ]; src = fetchgit { url = "https://git.orbekk.com/pjournal.git"; rev = "079e2067f30c099202fd51751ff966c527741b7a"; sha256 = "0pm8npys8z1ap7wjk85gvh1gyglrq4hah8mwyc8pqq8xqd6r666j"; }; cargoSha256 = "1jvsvhb5xfxdxv7wj77wniavmkm1v78ghqfrd7az84yzy3fzs2n2"; # verifyCargoDeps = true; }