nix: add meta snippet (#366)

* nix: add meta snippet

* nix: make hash snippet suitable for all usages

Usages such as `cargoHash`, `npmDepsHash` etc.
This commit is contained in:
Doron Behar 2023-10-01 04:23:14 +00:00 committed by GitHub
parent 0368bee1ce
commit 3e5377a4c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,7 @@
},
"hash": {
"prefix": "hash",
"body": "hash = \"${1:sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=}\";",
"body": "\"${1:sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=}\";",
"description": "Empty hash"
},
"fetchFrom": {
@ -81,5 +81,17 @@
"})"
],
"description": "Nixpkgs' stdenv.mkDerivation template"
},
"meta": {
"prefix": "meta",
"body": [
"meta = {",
" description = \"$1\";",
" homepage = \"$2\";",
" license = lib.licenses.$3;",
" maintainers = with lib.maintainers; [ $0 ];",
"};"
],
"description": "Nixpkgs' minimal meta attribute set"
}
}