21 extid = if fixedExtid == null then "nixos@${name}" else fixedExtid;
22 source = if url == null then src else
25 inherit sha1 sha256 sha512 hash;
35 builder = writeScript "xpibuilder" ''
38 echo "firefox addon $name into $out"
42 unzip -q ${source} -d "$out/$UUID"
43 NEW_MANIFEST=$(jq '. + {"applications": { "gecko": { "id": "${extid}" }}, "browser_specific_settings":{"gecko":{"id": "${extid}"}}}' "$out/$UUID/manifest.json")
44 echo "$NEW_MANIFEST" > "$out/$UUID/manifest.json"
46 zip -r -q -FS "$out/$UUID.xpi" *
47 strip-nondeterminism "$out/$UUID.xpi"