jonringer / nix-template

Make creating nix expressions easy
Creative Commons Zero v1.0 Universal
205 stars 8 forks source link

Add from-url option #13

Closed jonringer closed 2 years ago

jonringer commented 2 years ago
nix-template rust --stdout --from-url https://github.com/jonringer/nix-template
Determining latest release for nix-template
Determining sha256 for nix-template
{ lib, rustPlatform, fetchFromGitHub }:

rustPlatform.buildRustPackage rec {
  pname = "nix-template";
  version = "0.1.0";

  src = fetchFromGitHub {
    owner = "jonringer";
    repo = pname;
    rev = "v${version}";
    sha256 = "1h6xdvhzg7nb0s82b3r5bsh8bfdb1l5sm7fa24lfwd396xp9yyig";
  };

  cargoSha256 = "0000000000000000000000000000000000000000000000000000";

  buildInputs = [ ];

  meta = with lib; {
    description = "Make creating nix expressions easy";
    homepage = "https://github.com/jonringer/nix-template/";
    license = licenses.cc0;
    maintainers = with maintainers; [ jonringer ];
  };
}