Skip to content

Instantly share code, notes, and snippets.

@worldofpeace
Created November 22, 2019 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save worldofpeace/d90bb9a064387cede6b20410975218e1 to your computer and use it in GitHub Desktop.
Save worldofpeace/d90bb9a064387cede6b20410975218e1 to your computer and use it in GitHub Desktop.
"fetchFromGitHub": {
"prefix": "fetchFromGitHub",
"body": [
"fetchFromGitHub {",
"\towner = \"${1:owner}\";",
"\trepo = \"${2:repo}\";",
"\trev = \"${0:rev}\";",
"\tsha256 = stdenv.lib.fakeSha256;",
"};"
],
"description": "Function to fetch from GitHub"
},
"fetchFromGitLab": {
"prefix": "fetchFromGitLab",
"body": [
"fetchFromGitLab {",
"\tdomain = \"${1:domain}\";",
"\towner = \"${2:owner}\";",
"\trepo = \"${3:repo}\";",
"\trev = \"${0:rev}\";",
"\tsha256 = stdenv.lib.fakeSha256;",
"};"
],
"description": "Function to fetch from GitLab"
},
"fetchurl": {
"prefix": "fetchurl",
"body": [
"fetchurl {",
"\turl = \"${0:url}\";",
"\tsha256 = stdenv.lib.fakeSha256;",
"};"
],
"description": "Function to fetch from url"
},
"fetchzip": {
"prefix": "fetchzip",
"body": [
"fetchzip {",
"\turl = \"${0:url}\";",
"\tsha256 = stdenv.lib.fakeSha256;",
"};"
],
"description": "Function to fetch from url and hash the content"
},
"fetchgit": {
"prefix": "fetchgit",
"body": [
"fetchgit {",
"\turl = \"${1:url}\";",
"\trev = \"${0:rev}\";",
"\tsha256 = stdenv.lib.fakeSha256;",
"};"
],
"description": "Function to fetch from git repo"
},
"fetchPypi": {
"prefix": "fetchPypi",
"body": [
"fetchPypi {",
"\tinherit pname version;",
"\tsha256 = lib.fakeSha256;",
"};"
],
"description": "Function to fetch an archive for Pypi"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment