I am trying to package eww
for a polybar written in rust. I started with the following code:
{ config, pkgs, lib, rustPlatform, fetchFromGitHub, ... }:
rustPlatform.buildRustPackage rec {
pname = "eww";
version = "4f59424e0e82eb7ce76badb266974dd3e7ea6d8c";
src = fetchFromGitHub {
owner = "elkowar";
repo = pname;
rev = version;
sha256 = "1hqps7l5qrjh9f914r5i6kmcz6f1yb951nv4lby0cjnp5l253kps";
};
cargoSha256 = "1hqps7l5qrjh9f914r5i6kmcz6f1yb951nv4lby0cjnp5l253kps";
meta = with lib; {
description = "ElKowar's wacky widgets";
homepage = "https://github.com/elkowar/eww";
license = licenses.mit;
maintainers = [];
};
}
But I kept on getting the following error:
error: undefined variable 'fetchFromGitHub' at /etc/nixos/eww.nix:7:9
(use '--show-trace' to show detailed location information)
Why is it not working? I tried builtins.fetchFromGitHub
as well, but still I got the same error.