mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
lib/fetchers/fetch-ugee-driver: init
This commit is contained in:
parent
8fa4d576f8
commit
cde957a97d
@ -42,7 +42,7 @@ in pkgs.lib.makeExtensible (self:
|
|||||||
buildHugoSite buildFDSEnv;
|
buildHugoSite buildFDSEnv;
|
||||||
inherit (self.trivial) countAttrs filterAttrs';
|
inherit (self.trivial) countAttrs filterAttrs';
|
||||||
inherit (self.data) importYAML renderTeraTemplate renderMustacheTemplate;
|
inherit (self.data) importYAML renderTeraTemplate renderMustacheTemplate;
|
||||||
inherit (self.fetchers) fetchInternetArchive;
|
inherit (self.fetchers) fetchInternetArchive fetchUgeeDriver;
|
||||||
} // lib.optionalAttrs (builtins ? fetchTree) {
|
} // lib.optionalAttrs (builtins ? fetchTree) {
|
||||||
flake = callLib ./flake.nix;
|
flake = callLib ./flake.nix;
|
||||||
|
|
||||||
|
@ -2,4 +2,5 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
fetchInternetArchive = pkgs.callPackage ./fetch-internet-archive { };
|
fetchInternetArchive = pkgs.callPackage ./fetch-internet-archive { };
|
||||||
|
fetchUgeeDriver = pkgs.callPackage ./fetch-ugee-driver { };
|
||||||
}
|
}
|
||||||
|
15
lib/fetchers/fetch-ugee-driver/default.nix
Normal file
15
lib/fetchers/fetch-ugee-driver/default.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ fetchzip, lib }:
|
||||||
|
|
||||||
|
{
|
||||||
|
fileId,
|
||||||
|
pid,
|
||||||
|
ext ? "gz",
|
||||||
|
...
|
||||||
|
}@args:
|
||||||
|
|
||||||
|
let
|
||||||
|
args' = lib.removeAttrs args [ "fileId" "pid" "ext" ];
|
||||||
|
in
|
||||||
|
fetchzip (args' // {
|
||||||
|
url = "https://www.ugee.com/download/file/id/${fileId}/pid/${pid}/ext/${ext}";
|
||||||
|
})
|
@ -18,4 +18,13 @@
|
|||||||
formats = [ "TEXT" "PNG" ];
|
formats = [ "TEXT" "PNG" ];
|
||||||
hash = "sha256-xbhasJ/wEgcY+EcBAJp5UoYB4N4It3QV/iIeGGdCET8=";
|
hash = "sha256-xbhasJ/wEgcY+EcBAJp5UoYB4N4It3QV/iIeGGdCET8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
testsFetchUgeeDriver =
|
||||||
|
# Ugee M908.
|
||||||
|
self.fetchers.fetchUgeeDriver {
|
||||||
|
fileId = "943";
|
||||||
|
pid = "505";
|
||||||
|
hash = "sha256-50Dbyaaa1B8nQu3+tTGvh/yjQqwaARB2MWtKSOUYsKg=";
|
||||||
|
extension = "tar.gz";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user