Compare commits
89 Commits
jetbrains
...
698ad1803d
Author | SHA1 | Date | |
---|---|---|---|
698ad1803d
|
|||
896b46b2f4 | |||
16c3c01730 | |||
26f6048226 | |||
69bc4e5e49 | |||
8c691f457a | |||
ea79df8fbf | |||
bfc5062bb6 | |||
2df4be1363 | |||
4b69efc799 | |||
9898d8265c | |||
509a3f9918 | |||
93bdded413 | |||
f6fe0ddb84 | |||
803f73b8b8 | |||
bced319f32
|
|||
a798e65465 | |||
d36de346ad
|
|||
b7f88d78b5
|
|||
71f6ac0f46
|
|||
561afaf18c
|
|||
f0dc2d521d
|
|||
4586c00f4e
|
|||
162045b8d7 | |||
fc1f1b328b
|
|||
4be1dd48ce | |||
8bbc8afb15
|
|||
6faef6e0ac
|
|||
29516dc3d8
|
|||
a2f24f4591 | |||
8f34b7a6fa
|
|||
5410671050
|
|||
e053da240d
|
|||
d0e26ddb24
|
|||
2efddce7c5
|
|||
3d8a9cfa9a
|
|||
782b05c59e
|
|||
67adbe7089
|
|||
5399368853
|
|||
ec62dc7950
|
|||
f20db9aa1b
|
|||
b21cbda697
|
|||
ada5f02f08
|
|||
c387334fa5 | |||
57711572f6 | |||
a83dcb3ed5
|
|||
a70a0e914b
|
|||
46b331a413 | |||
b8e4f0929a
|
|||
85aebac63d
|
|||
0254963dec | |||
0b3995a7e3 | |||
7414d45aa4 | |||
ee0cf26f5b | |||
658b1fa08c | |||
fc33441151 | |||
0bb9971c38
|
|||
1530197670
|
|||
2c575d6596
|
|||
5648d1d005 | |||
d97d0fc259 | |||
f5adcca761 | |||
6d3581ac49 | |||
94be83c704 | |||
fe773352f5 | |||
311fb3ff98 | |||
260db819e7 | |||
ba5c904cb7 | |||
f616baa7b2 | |||
d1ad137626 | |||
0335b240b6 | |||
7edffe7e56 | |||
f218f59184
|
|||
1b190f8a81
|
|||
f7f4206afa
|
|||
ca67f392b5
|
|||
3ce504e445
|
|||
58abb0d562
|
|||
2cf1b51843
|
|||
d8ae11352e
|
|||
7078ef0677
|
|||
b2c0121005
|
|||
cf95fb9600
|
|||
3c27e38073
|
|||
86f1713639 | |||
3dbd760954
|
|||
8b290acc50
|
|||
b960c361a9
|
|||
0c87ddac9e |
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@ -4,3 +4,5 @@ updates:
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
commit-message:
|
||||
prefix: "ci"
|
||||
|
47
.github/workflows/build.yml
vendored
47
.github/workflows/build.yml
vendored
@ -1,14 +1,27 @@
|
||||
name: "Build and populate cache"
|
||||
name: "CI"
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
# rebuild everyday at 6:50
|
||||
# TIP: Choose a random time here so not all repositories are build at once:
|
||||
# https://www.random.org/clock-times/?num=1&earliest=01%3A00&latest=08%3A00&interval=5&format=html&rnd=new
|
||||
- cron: '50 6 * * *'
|
||||
jobs:
|
||||
tests:
|
||||
|
||||
checks:
|
||||
strategy:
|
||||
matrix:
|
||||
check:
|
||||
- nixpkgs-fmt
|
||||
- deadnix
|
||||
- nur
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v20
|
||||
- name: Check ${{ matrix.check }}
|
||||
# Depends on nixos/nix#7759 to simply `nix flake check`
|
||||
run: nix run .#checks.$(nix eval --raw --impure --expr "builtins.currentSystem").${{ matrix.check }}
|
||||
continue-on-error: true
|
||||
|
||||
build-and-update:
|
||||
strategy:
|
||||
matrix:
|
||||
# Set this to notify the global nur package registry that changes are
|
||||
@ -28,30 +41,22 @@ jobs:
|
||||
# in your repository settings in Github found at https://github.com/<your_githubname>/nur-packages/settings/secrets
|
||||
cachixName:
|
||||
- xeals
|
||||
nixPath:
|
||||
- nixpkgs=channel:nixos-unstable
|
||||
- nixpkgs=channel:nixpkgs-unstable
|
||||
# Disable due to buildGoModule and buildRustPackage
|
||||
# - nixpkgs=channel:nixos-20.03
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2.3.4
|
||||
uses: actions/checkout@v3
|
||||
- name: Install nix
|
||||
uses: cachix/install-nix-action@v12
|
||||
with:
|
||||
nix_path: "${{ matrix.nixPath }}"
|
||||
uses: cachix/install-nix-action@v20
|
||||
- name: Show nixpkgs version
|
||||
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
|
||||
run: nix eval --impure --expr '(import ./flake-compat.nix { src = ./.; }).lib.version'
|
||||
- name: Setup cachix
|
||||
uses: cachix/cachix-action@v8
|
||||
uses: cachix/cachix-action@v12
|
||||
if: ${{ matrix.cachixName != '<YOUR_CACHIX_NAME>' }}
|
||||
with:
|
||||
name: ${{ matrix.cachixName }}
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
- name: Build nix packages
|
||||
# TODO switch to default nixpkgs channel once nix-build-uncached 1.0.0 is in stable
|
||||
run: nix run -I 'nixpkgs=channel:nixos-unstable' nixpkgs.nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs
|
||||
run: nix develop .#ci -c nix-build-uncached ci.nix -A cacheOutputs
|
||||
- name: Trigger NUR update
|
||||
if: ${{ matrix.nurRepo != '<YOUR_REPO_NAME>' }}
|
||||
run: curl -XPOST "https://nur-update.herokuapp.com/update?repo=${{ matrix.nurRepo }}"
|
||||
run: curl -XPOST "https://nur-update.nix-community.org/update?repo=${{ matrix.nurRepo }}"
|
||||
|
24
.github/workflows/update.yml
vendored
Normal file
24
.github/workflows/update.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: "Update flake inputs"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# bump weekly at 6:50
|
||||
- cron: '50 6 * * 1'
|
||||
jobs:
|
||||
update-flake:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v20
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
- name: "flake: update inputs"
|
||||
uses: DeterminateSystems/update-flake-lock@v19
|
||||
with:
|
||||
pr-title: "flake: update inputs"
|
||||
pr-labels: dependencies
|
||||
commit-msg: "flake: update inputs"
|
@ -2,7 +2,7 @@
|
||||
|
||||
**My personal [NUR](https://github.com/nix-community/NUR) repository**
|
||||
|
||||
[](https://github.com/xeals/nur-packages/actions) [](https://xeals.cachix.org)
|
||||
[](https://github.com/xeals/nur-packages/actions) [](https://xeals.cachix.org)
|
||||
|
||||
## Noteworthy packages
|
||||
|
||||
|
@ -7,7 +7,6 @@ import re
|
||||
import requests
|
||||
import subprocess as sp
|
||||
import sys
|
||||
import unicodedata
|
||||
import urllib
|
||||
|
||||
from lxml import etree
|
||||
@ -28,15 +27,10 @@ PRODUCT_CODE = {
|
||||
}
|
||||
|
||||
|
||||
PACKAGE_RE = re.compile("[^0-9A-Za-z._-]")
|
||||
HTML_RE = re.compile("<[^>]+/?>")
|
||||
|
||||
|
||||
def to_slug(name):
|
||||
slug = name.replace(" ", "-").lstrip(".")
|
||||
for char in ",/;'\\<>:\"|!@#$%^&*()":
|
||||
slug = slug.replace(char, "")
|
||||
slug = unicodedata.normalize("NFD", slug).encode("ascii", "ignore").decode("utf-8")
|
||||
return slug
|
||||
|
||||
|
||||
@ -65,15 +59,18 @@ class Build:
|
||||
return self.code + "-" + self.version
|
||||
|
||||
|
||||
PACKAGE_RE = re.compile("[^0-9A-Za-z._-]")
|
||||
HTML_RE = re.compile("<[^>]+/?>")
|
||||
|
||||
|
||||
class Plugin:
|
||||
def __init__(self, data, build, category=None):
|
||||
self.build = build
|
||||
def __init__(self, data, category=None):
|
||||
self.category = category
|
||||
self.name = data.find("name").text
|
||||
self.xml_id = data.find("id").text
|
||||
self.id = data.find("id").text
|
||||
self._description = data.find("description").text
|
||||
self.url = data.get("url") or data.find("vendor").get("url")
|
||||
self.version = data.find("version").text.replace(" ", "-")
|
||||
self.version = data.find("version").text
|
||||
self.slug = to_slug(self.name)
|
||||
self.orig_slug = self.slug
|
||||
|
||||
@ -87,7 +84,7 @@ class Plugin:
|
||||
def description(self):
|
||||
return re.sub(HTML_RE, "", self._description or "").strip()
|
||||
|
||||
def get_download_url(self, deref=True):
|
||||
def download_url(self, build, deref=True):
|
||||
"""
|
||||
Provides the ZIP download URL for this plugin.
|
||||
|
||||
@ -97,52 +94,18 @@ class Plugin:
|
||||
(which it is by default). However, this comes at the cost of requiring
|
||||
an HTTP request.
|
||||
"""
|
||||
id = urllib.parse.quote(self.xml_id)
|
||||
url = f"https://plugins.jetbrains.com/pluginManager?action=download&id={id}&build={self.build}"
|
||||
id = urllib.parse.quote(self.id)
|
||||
url = f"https://plugins.jetbrains.com/pluginManager?action=download&id={id}&build={build}"
|
||||
if deref:
|
||||
res = requests.get(url, allow_redirects=not deref)
|
||||
url = "https://plugins.jetbrains.com" + re.sub(
|
||||
"\?.*$", "", res.headers["location"]
|
||||
)
|
||||
self.jetbrains_url = url
|
||||
if url.endswith("external"):
|
||||
res = requests.get(url, allow_redirects=not deref)
|
||||
url = res.headers["location"]
|
||||
return url
|
||||
|
||||
def fetch_external(self, update_only=False):
|
||||
"""
|
||||
Performs network calls to update this plugin with information that
|
||||
cannot be performed from the public XML API.
|
||||
|
||||
Additional attributes provided after this method:
|
||||
|
||||
download_url : the plugin download location
|
||||
sha : the SHA256 of the download source
|
||||
|
||||
If update_only is true, a full update is performed, also providing:
|
||||
|
||||
id : the plugin integer ID
|
||||
license_url : the plugin license URL
|
||||
license : the Nixpkgs license attribute
|
||||
"""
|
||||
self.download_url = self.get_download_url(deref=True)
|
||||
self.sha = prefetch(self, self.build, self.download_url)
|
||||
|
||||
if update_only:
|
||||
return
|
||||
|
||||
self.id = self.jetbrains_url.split("/")[4]
|
||||
res = requests.get(
|
||||
f"https://plugins.jetbrains.com/api/plugins/{self.id}"
|
||||
).json()
|
||||
try:
|
||||
self.url = self.url or res["urls"]["sourceCodeUrl"]
|
||||
except KeyError:
|
||||
pass
|
||||
self.license_url = res["urls"]["licenseUrl"]
|
||||
self.license = translate_license(self.license_url, fallback=self.url)
|
||||
|
||||
def packagename(self):
|
||||
slug = re.sub(PACKAGE_RE, "", self.slug.lower()).replace(".", "-")
|
||||
if slug[0] in "1234567890":
|
||||
@ -165,16 +128,16 @@ def list_plugins(build):
|
||||
https://plugins.jetbrains.com/docs/marketplace/plugins-list.html
|
||||
"""
|
||||
resp = requests.get(f"https://plugins.jetbrains.com/plugins/list/?build={build}")
|
||||
return parse_repository(resp.content, build)
|
||||
return parse_repository(resp.content)
|
||||
|
||||
|
||||
def parse_repository(content, build):
|
||||
def parse_repository(content):
|
||||
tree = etree.XML(content)
|
||||
plugins = []
|
||||
for cat in tree.findall("category"):
|
||||
cat_name = cat.get("name")
|
||||
for plugin in cat.findall("idea-plugin"):
|
||||
plugins.append(Plugin(plugin, build, cat_name))
|
||||
plugins.append(Plugin(plugin, cat_name))
|
||||
return plugins
|
||||
|
||||
|
||||
@ -192,101 +155,28 @@ def deduplicate(plugins):
|
||||
|
||||
def prefetch(plugin, build, url=None):
|
||||
if not url:
|
||||
url = plugin.download_url or plugin.get_download_url()
|
||||
url = plugin.download_url(build)
|
||||
res = sp.run(
|
||||
["nix-prefetch-url", "--name", plugin.filename(), url], capture_output=True,
|
||||
)
|
||||
if not res.stdout:
|
||||
raise IOError(
|
||||
f"nix-prefetch-url {plugin} failed: {res.stderr.decode('unicode-escape')}"
|
||||
)
|
||||
return res.stdout.decode("unicode-escape").strip()
|
||||
raise IOError(f"nix-prefetch-url {plugin} failed: {res.stderr.decode('utf-8')}")
|
||||
return res.stdout.decode("utf-8").strip()
|
||||
|
||||
|
||||
def custom_license(short, full, url, free=False):
|
||||
return f"""{{
|
||||
shortName = "{short}";
|
||||
fullName = "{full}";
|
||||
url = "{url}";
|
||||
free = {"true" if free else "false"};
|
||||
}}"""
|
||||
|
||||
|
||||
def arr(url):
|
||||
return custom_license("allrightsreserved", "All Rights Reserved", url)
|
||||
|
||||
|
||||
def translate_license(url, fallback=""):
|
||||
license = url.lower()
|
||||
if license == "":
|
||||
print(f"no license for {fallback}", file=sys.stderr)
|
||||
return arr(fallback)
|
||||
# Common (license) hosts
|
||||
elif "github.com" in license or "raw.githubusercontent.com" in license:
|
||||
try:
|
||||
owner, repo = url.split("/")[3:5]
|
||||
except ValueError:
|
||||
print(f"no license metadata for {url}", file=sys.stderr)
|
||||
return arr(url)
|
||||
res = requests.get(
|
||||
f"https://api.github.com/repos/{owner}/{repo}",
|
||||
headers={"Accept": "application/vnd.github.v3+json"},
|
||||
).json()
|
||||
try:
|
||||
return translate_license(res["license"]["key"])
|
||||
except (KeyError, TypeError):
|
||||
print(f"no license metadata for {url}", file=sys.stderr)
|
||||
return arr(url)
|
||||
elif "opensource.org" in license:
|
||||
os_license = license.rstrip("/").split("/")[-1]
|
||||
if os_license == "alphabetical":
|
||||
# Doesn't actually have a license, it's the listing page
|
||||
return arr(fallback)
|
||||
return translate_license(os_license)
|
||||
# Actual translations now
|
||||
elif "apache.org/licenses/license-2.0" in license or "apache-2.0" in license:
|
||||
return "lib.licenses.asl20"
|
||||
elif "artistic-2" in license:
|
||||
return "lib.licenses.artistic2"
|
||||
elif "bsd-2-clause" in license:
|
||||
return "lib.licenses.bsd2"
|
||||
elif "bsd-3-clause" in license:
|
||||
return "lib.licenses.bsd3"
|
||||
elif "eclipse.org/legal/epl-2.0" in license:
|
||||
return "lib.licenses.epl20"
|
||||
elif "gpl-3.0" in license:
|
||||
return "lib.licenses.gpl3Only"
|
||||
elif "mit" in license:
|
||||
return "lib.licenses.mit"
|
||||
elif "osd" in license:
|
||||
return "lib.licenses.free"
|
||||
elif "other" == license:
|
||||
return arr(fallback)
|
||||
# Custom known licenses
|
||||
elif "plugins.jetbrains.com/legal/terms-of-use" in license:
|
||||
return custom_license(
|
||||
"jetbrains", "Jetbrains Plugin Marketplace Agreement", license
|
||||
)
|
||||
# Fallback
|
||||
else:
|
||||
print(f"unrecognised license {license}", file=sys.stderr)
|
||||
return arr(license)
|
||||
|
||||
|
||||
def write_packages(outfile, plugins):
|
||||
builder = plugins[0].build.builder() or ""
|
||||
def write_packages(outfile, plugins, build):
|
||||
builder = build.builder()
|
||||
outfile.write("{callPackage}:\n{")
|
||||
|
||||
for i, plugin in enumerate(plugins):
|
||||
print(f"{i:04} {plugin.packagename()}")
|
||||
for plugin in plugins:
|
||||
src_url = plugin.download_url(build, deref=True)
|
||||
src_ext = os.path.splitext(src_url)[-1]
|
||||
|
||||
try:
|
||||
plugin.fetch_external()
|
||||
sha = prefetch(plugin, build, src_url)
|
||||
except IOError as e:
|
||||
print(e, file=sys.stderr)
|
||||
continue
|
||||
src_url = plugin.download_url
|
||||
src_ext = os.path.splitext(src_url)[-1]
|
||||
sha = plugin.sha
|
||||
|
||||
build_inputs = []
|
||||
if src_ext == ".zip":
|
||||
@ -296,7 +186,7 @@ def write_packages(outfile, plugins):
|
||||
# internal and external plugins; need to find some way to resolve them
|
||||
requires = []
|
||||
# TODO: Licenses are actually on the website, but aren't provided in the API
|
||||
license = plugin.license
|
||||
license = "lib.licenses.free"
|
||||
|
||||
call_args = [str(builder), "fetchurl", "lib"]
|
||||
for binput in build_inputs:
|
||||
@ -307,7 +197,7 @@ def write_packages(outfile, plugins):
|
||||
{plugin.packagename()} = callPackage ({{ {", ".join(sorted(call_args))} }}: {builder} {{
|
||||
pname = "{plugin.slug}";
|
||||
plugname = "{plugin.name}";
|
||||
plugid = "{plugin.xml_id}";
|
||||
plugid = "{plugin.id}";
|
||||
version = "{plugin.version}";
|
||||
src = fetchurl {{
|
||||
url = "{src_url}";
|
||||
@ -337,7 +227,6 @@ def main():
|
||||
parser.add_argument(
|
||||
"-o", "--out", type=str, help="File to write plugins to",
|
||||
)
|
||||
parser.add_argument("-O", "--offset", type=int, help="Offset number of packages")
|
||||
parser.add_argument(
|
||||
"package",
|
||||
metavar="PACKAGE",
|
||||
@ -352,17 +241,15 @@ def main():
|
||||
plugins.sort(key=lambda p: p.slug)
|
||||
deduplicate(plugins)
|
||||
|
||||
if args.offset:
|
||||
plugins = plugins[args.offset :]
|
||||
if args.number:
|
||||
plugins = plugins[: args.number]
|
||||
|
||||
print(f"Generating packages for {len(plugins)} plugins", file=sys.stderr)
|
||||
if not args.out:
|
||||
write_packages(sys.stdout, plugins)
|
||||
write_packages(sys.stdout, plugins, build)
|
||||
else:
|
||||
with open(args.out, "w") as f:
|
||||
write_packages(f, plugins)
|
||||
write_packages(f, plugins, build)
|
||||
|
||||
|
||||
main()
|
15
callUnitRoot.nix
Normal file
15
callUnitRoot.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ pkgs
|
||||
, lib ? pkgs.lib
|
||||
, unitDir ? "unit"
|
||||
, packageFun ? "package.nix"
|
||||
, root ? "${./pkgs}/${unitDir}"
|
||||
}:
|
||||
let
|
||||
shards = lib.attrNames (builtins.readDir root);
|
||||
namesForShard = shard: lib.mapAttrs'
|
||||
(name: _: { inherit name; value = root + "/${shard}/${name}"; })
|
||||
(builtins.readDir (root + "/${shard}"));
|
||||
namesToPath = lib.foldl' lib.recursiveUpdate { } (map namesForShard shards);
|
||||
units = lib.mapAttrs (_: path: pkgs.callPackage (path + "/${packageFun}") { }) namesToPath;
|
||||
in
|
||||
units
|
6
ci.nix
6
ci.nix
@ -9,7 +9,7 @@
|
||||
# then your CI will be able to build and cache only those packages for
|
||||
# which this is possible.
|
||||
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
{ pkgs ? import ./flake-compat.nix { src = ./.; } }:
|
||||
|
||||
with builtins;
|
||||
|
||||
@ -29,8 +29,8 @@ let
|
||||
let
|
||||
f = p:
|
||||
if shouldRecurseForDerivations p then flattenPkgs p
|
||||
else if isDerivation p then [p]
|
||||
else [];
|
||||
else if isDerivation p then [ p ]
|
||||
else [ ];
|
||||
in
|
||||
concatMap f (attrValues s);
|
||||
|
||||
|
@ -7,9 +7,11 @@
|
||||
# nix-build -A mypackage
|
||||
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
import ./pkgs/top-level/all-packages.nix { inherit pkgs; }
|
||||
// {
|
||||
let
|
||||
legacy = import ./pkgs/top-level/all-packages.nix { inherit pkgs; };
|
||||
units = import ./callUnitRoot.nix { inherit pkgs; root = ./pkgs/unit; };
|
||||
in
|
||||
legacy // units // {
|
||||
# The `lib`, `modules`, and `overlay` names are special
|
||||
lib = import ./lib { inherit pkgs; }; # functions
|
||||
modules = import ./modules; # NixOS modules
|
||||
|
12
flake-compat.nix
Normal file
12
flake-compat.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ src, system ? builtins.currentSystem or "unknown-system" }:
|
||||
|
||||
let
|
||||
lockFilePath = "${src}/flake.lock";
|
||||
lockFile = builtins.fromJSON (builtins.readFile lockFilePath);
|
||||
nixpkgs = lockFile.nodes.nixpkgs.locked;
|
||||
tarball = fetchTarball {
|
||||
url = "https://github.com/${nixpkgs.owner}/${nixpkgs.repo}/archive/${nixpkgs.rev}.zip";
|
||||
sha256 = nixpkgs.narHash;
|
||||
};
|
||||
in
|
||||
import tarball { inherit system; }
|
30
flake.lock
generated
30
flake.lock
generated
@ -1,12 +1,15 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1605370193,
|
||||
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",
|
||||
"lastModified": 1681202837,
|
||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5021eac20303a61fafe17224c087f5519baed54d",
|
||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -17,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1611414562,
|
||||
"narHash": "sha256-u002KfYA7Uk3vffnnmLz88BmxOzixYFdh+8II6ZT+Kg=",
|
||||
"lastModified": 1684668519,
|
||||
"narHash": "sha256-KkVvlXTqdLLwko9Y0p1Xv6KQ9QTcQorrU098cGilb7c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9d6fd2ba135c5b5c85c3332604d39b43e93b8298",
|
||||
"rev": "85340996ba67cc02f01ba324e18b1306892ed6f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -36,6 +39,21 @@
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
99
flake.nix
99
flake.nix
@ -1,47 +1,76 @@
|
||||
{
|
||||
description = "xeals's flake";
|
||||
description = "xeals's Nix repository";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
let
|
||||
inherit (flake-utils.lib) eachDefaultSystem flattenTree;
|
||||
inherit (nixpkgs.lib.attrsets) filterAttrs mapAttrs;
|
||||
inherit (nixpkgs) lib;
|
||||
inherit (flake-utils.lib) mkApp;
|
||||
in
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
nixosModules = mapAttrs (_: path: import path) (import ./modules);
|
||||
# nixos/rfcs#140
|
||||
# Only produces the package set of the proposed functionality.
|
||||
# Unstable names are variables.
|
||||
packages =
|
||||
let
|
||||
legacyPackages = import ./pkgs/top-level/all-packages.nix { inherit pkgs; };
|
||||
unitPackages = import ./callUnitRoot.nix { inherit pkgs; };
|
||||
onlyAvailable = lib.filterAttrs (_: drv: builtins.elem system (drv.meta.platforms or [ ]));
|
||||
in
|
||||
onlyAvailable (legacyPackages // unitPackages);
|
||||
|
||||
checks = {
|
||||
nixpkgs-fmt = pkgs.writeShellScriptBin "nixpkgs-fmt-check" ''
|
||||
${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt --check .
|
||||
'';
|
||||
deadnix = pkgs.writeShellScriptBin "deadnix-check" ''
|
||||
${pkgs.deadnix}/bin/deadnix --fail .
|
||||
'';
|
||||
# Ensures that the NUR bot can evaluate and find all our packages.
|
||||
# Normally we'd also run with `--option restrict-eval true`, but
|
||||
# this is incompatible with flakes because reasons.
|
||||
nur = pkgs.writeShellScriptBin "nur-check" ''
|
||||
nix-env -f . -qa \* --meta \
|
||||
--allowed-uris https://static.rust-lang.org \
|
||||
--option allow-import-from-derivation true \
|
||||
--drv-path --show-trace \
|
||||
-I nixpkgs=$(nix-instantiate --find-file nixpkgs) \
|
||||
-I ./ \
|
||||
--json | ${pkgs.jq}/bin/jq -r 'values | .[].name'
|
||||
'';
|
||||
};
|
||||
|
||||
devShells.ci = pkgs.mkShellNoCC {
|
||||
buildInputs = [ pkgs.nix-build-uncached ];
|
||||
};
|
||||
|
||||
apps = {
|
||||
alacritty = mkApp { drv = pkgs.alacritty-ligatures; exePath = "/bin/alacritty"; };
|
||||
protonmail-bridge = mkApp { drv = pkgs.protonmail-bridge; };
|
||||
protonmail-bridge-headless = mkApp { drv = pkgs.protonmail-bridge; };
|
||||
psst-cli = mkApp { drv = pkgs.psst; exePath = "/bin/psst-cli"; };
|
||||
psst-gui = mkApp { drv = pkgs.psst; exePath = "/bin/psst-gui"; };
|
||||
samrewritten = mkApp { drv = pkgs.samrewritten; };
|
||||
spotify-ripper = mkApp { drv = pkgs.spotify-ripper; };
|
||||
};
|
||||
})
|
||||
// {
|
||||
nixosModules = lib.mapAttrs (_: path: import path) (import ./modules) // {
|
||||
default = {
|
||||
imports = lib.attrValues self.nixosModules;
|
||||
};
|
||||
};
|
||||
|
||||
overlays = import ./overlays // {
|
||||
pkgs = final: prev: import ./pkgs/top-level/all-packages.nix { pkgs = prev; };
|
||||
pkgs = _: prev: import ./pkgs/top-level/all-packages.nix { pkgs = prev; };
|
||||
default = _: _: { xeals = nixpkgs.lib.composeExtensions self.overlays.pkgs; };
|
||||
};
|
||||
|
||||
overlay = final: prev: {
|
||||
xeals = nixpkgs.lib.composeExtensions self.overlays.pkgs;
|
||||
};
|
||||
} // eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
xPkgs = import ./pkgs/top-level/all-packages.nix { inherit pkgs; };
|
||||
mkApp = opts: { type = "app"; } // opts;
|
||||
in
|
||||
rec {
|
||||
packages = filterAttrs
|
||||
(attr: drv: builtins.elem system (drv.meta.platforms or [ ]))
|
||||
(flattenTree xPkgs);
|
||||
|
||||
apps = flattenTree {
|
||||
alacritty = mkApp { program = "${packages.alacritty-ligatures}/bin/alacritty"; };
|
||||
protonmail-bridge = mkApp { program = "${packages.protonmail-bridge}/bin/protonmail-bridge"; };
|
||||
protonmail-bridge-headless = mkApp { program = "${packages.protonmail-bridge}/bin/protonmail-bridge"; };
|
||||
psst = {
|
||||
cli = mkApp { program = "${packages.psst}/bin/psst-cli"; };
|
||||
gui = mkApp { program = "${packages.psst}/bin/psst-gui"; };
|
||||
};
|
||||
samrewritten = mkApp { program = "${packages.samrewritten}/bin/samrewritten"; };
|
||||
spotify-ripper = mkApp { program = "${packages.spotify-ripper}/bin/spotify-ripper"; };
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
amdgpu-common = ./services/hardware/amdgpu-common.nix;
|
||||
amdgpu-fan = ./services/hardware/amdgpu-fan.nix;
|
||||
amdgpu-pwm = ./services/hardware/amdgpu-pwm.nix;
|
||||
dunst = ./services/x11/dunst.nix;
|
||||
radeon-profile-daemon = ./services/hardware/radeon-profile-daemon.nix;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
@ -7,7 +7,7 @@ with lib;
|
||||
cards = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "card0" ];
|
||||
example = literalExample ''[ "card0" ]'';
|
||||
example = [ "card0" "card1" ];
|
||||
description = ''
|
||||
A list of cards to enable fan configuration for. The identifiers for
|
||||
each device can be found in /sys/class/drm/ as card0, card1, etc.
|
||||
|
@ -33,14 +33,12 @@ in
|
||||
[ 75 89 ]
|
||||
[ 80 100 ]
|
||||
];
|
||||
example = literalExample ''
|
||||
[
|
||||
example = [
|
||||
[ 0 0 ]
|
||||
[ 40 30 ]
|
||||
[ 60 50 ]
|
||||
[ 80 100 ]
|
||||
]
|
||||
'';
|
||||
];
|
||||
description = ''
|
||||
A list of temperature-fan speed pairs. The temperature is specified in
|
||||
degrees celcius, and speed is specified in %.
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
68
modules/services/x11/dunst.nix
Normal file
68
modules/services/x11/dunst.nix
Normal file
@ -0,0 +1,68 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.dunst;
|
||||
in
|
||||
{
|
||||
options.services.dunst = {
|
||||
enable = mkEnableOption "dunst";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.dunst;
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = types.nullOr types.attrs;
|
||||
default = null;
|
||||
description = ''
|
||||
Configuration set alternative to <literal>configFile</literal>.
|
||||
'';
|
||||
example = {
|
||||
global = {
|
||||
monitor = 0;
|
||||
follow = "none";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
configFile = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = "Path to dunstrc configuration file.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !(cfg.settings != null && cfg.configFile != null);
|
||||
message = "only one of services.dunst.settings or .configFile may be specified";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ (getOutput "man" cfg.package) ];
|
||||
|
||||
systemd.user.services.dunst = {
|
||||
description = "Dunst notification daemon";
|
||||
documentation = [ "man:dunst(1)" ];
|
||||
after = [ "graphical-session-pre.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "dbus";
|
||||
BusName = "org.freedesktop.Notifications";
|
||||
ExecStart =
|
||||
let
|
||||
config =
|
||||
if (cfg.settings != null)
|
||||
then pkgs.writeText "dunstrc" (generators.toINI { } cfg.settings)
|
||||
else if (cfg.configFile != null)
|
||||
then cfg.configFile
|
||||
else null;
|
||||
in
|
||||
"${cfg.package}/bin/dunst ${optionalString (config != null) "-conf ${config}"}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
# case where you don't want to add the whole NUR namespace to your
|
||||
# configuration.
|
||||
|
||||
self: super:
|
||||
_self: super:
|
||||
|
||||
let
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, python3Packages
|
||||
|
||||
@ -20,7 +20,7 @@ python3Packages.buildPythonApplication rec {
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Prior99/mopidy-subidy";
|
||||
description = "Mopidy extension for playing music from Subsonic servers";
|
||||
license = licenses.bsd3;
|
||||
|
45
pkgs/applications/editors/jetbrains/common-plugins.nix
Normal file
45
pkgs/applications/editors/jetbrains/common-plugins.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{ lib, stdenv, fetchzip }:
|
||||
|
||||
self:
|
||||
|
||||
let
|
||||
|
||||
commonBuild = import ../../../build-support/jetbrains/plugin.nix {
|
||||
inherit lib stdenv fetchzip;
|
||||
jetbrainsPlatforms = [
|
||||
"clion"
|
||||
"datagrip"
|
||||
"goland"
|
||||
"idea-community"
|
||||
"idea-ultimate"
|
||||
"phpstorm"
|
||||
"pycharm-community"
|
||||
"pycharm-professional"
|
||||
"rider"
|
||||
"ruby-mine"
|
||||
"webstorm"
|
||||
];
|
||||
};
|
||||
|
||||
generateCommon = lib.makeOverridable (
|
||||
{ common ? ./manual-common-packages.nix
|
||||
}:
|
||||
let
|
||||
|
||||
imported = import common {
|
||||
inherit (self) callPackage;
|
||||
};
|
||||
|
||||
super = imported;
|
||||
|
||||
overrides = { };
|
||||
|
||||
jetbrainsPlugins = super // overrides;
|
||||
|
||||
in
|
||||
jetbrainsPlugins // { inherit commonBuild; }
|
||||
);
|
||||
|
||||
in
|
||||
generateCommon { }
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,9 +9,10 @@ let
|
||||
jetbrainsPlatforms = [ "idea-community" "idea-ultimate" ];
|
||||
};
|
||||
|
||||
generateIdea = lib.makeOverridable ({
|
||||
idea ? ./idea-generated.nix
|
||||
}: let
|
||||
generateIdea = lib.makeOverridable (
|
||||
{ idea ? ./manual-idea-packages.nix
|
||||
}:
|
||||
let
|
||||
|
||||
imported = import idea {
|
||||
inherit (self) callPackage;
|
||||
@ -23,7 +24,10 @@ let
|
||||
|
||||
ideaPlugins = super // overrides;
|
||||
|
||||
in ideaPlugins // { inherit ideaBuild; });
|
||||
in
|
||||
ideaPlugins // { inherit ideaBuild; }
|
||||
);
|
||||
|
||||
in generateIdea { }
|
||||
in
|
||||
generateIdea { }
|
||||
|
||||
|
@ -0,0 +1,33 @@
|
||||
{ callPackage }:
|
||||
{
|
||||
ideavim = callPackage
|
||||
({ commonBuild }: commonBuild {
|
||||
pname = "IdeaVim";
|
||||
version = "0.57";
|
||||
pluginId = 164;
|
||||
versionId = 85009;
|
||||
sha256 = "1rwfwj0b0nwi7jxhzxk1r0xc190nf4i3b59i0zknpmgb4yc5clzw";
|
||||
})
|
||||
{ };
|
||||
|
||||
checkstyle-idea = callPackage
|
||||
({ commonBuild }: commonBuild {
|
||||
pname = "CheckStyle-IDEA";
|
||||
version = "5.42.0";
|
||||
pluginId = 1065;
|
||||
versionId = 95757;
|
||||
sha256 = "0sji3649n5zz84dlidqaklipq6vaiafxsvg0gzy3j59mvkz6dk14";
|
||||
})
|
||||
{ };
|
||||
|
||||
google-java-format = callPackage
|
||||
({ commonBuild }: commonBuild rec {
|
||||
pname = "google-java-format";
|
||||
version = "1.7.0.4";
|
||||
pluginId = 8527;
|
||||
versionId = 83164;
|
||||
sha256 = "1pmnn1ksiv44kdga53gi3psrm2sva4bqrxizagbr0if2n0rrvgii";
|
||||
filename = "${pname}.zip";
|
||||
})
|
||||
{ };
|
||||
}
|
12
pkgs/applications/editors/jetbrains/manual-idea-packages.nix
Normal file
12
pkgs/applications/editors/jetbrains/manual-idea-packages.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ callPackage }:
|
||||
{
|
||||
spring-assistant = callPackage
|
||||
({ ideaBuild }: ideaBuild {
|
||||
pname = "intellij-spring-assistant";
|
||||
version = "0.12.0";
|
||||
pluginId = 10229;
|
||||
versionId = 44968;
|
||||
sha256 = "13cglywzhb4j0qj0bs2jwaz2k8pxrxalv35wgkmgkxr635bxmwsj";
|
||||
})
|
||||
{ };
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell --show-trace ./updater.nix -i bash
|
||||
|
||||
set -e
|
||||
|
||||
for app in $APPS; do
|
||||
./updater-jetbrains $app -o ${app%-[0-9.]*}-generated.nix
|
||||
done
|
||||
|
||||
# Local Variables:
|
||||
# mode: sh
|
||||
# End:
|
@ -1,26 +0,0 @@
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
let
|
||||
inherit (pkgs.stdenv) lib;
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.bash
|
||||
];
|
||||
|
||||
APPS = lib.mapAttrsToList
|
||||
(k: v: v.name)
|
||||
{
|
||||
inherit (pkgs.jetbrains)
|
||||
clion
|
||||
datagrip
|
||||
goland
|
||||
idea-community
|
||||
idea-ultimate
|
||||
phpstorm
|
||||
pycharm-community
|
||||
pycharm-professional
|
||||
rider
|
||||
ruby-mine
|
||||
webstorm;
|
||||
};
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
{ lib, makeWrapper, runCommand }: self:
|
||||
{ lib
|
||||
}: self:
|
||||
|
||||
with lib;
|
||||
|
||||
@ -19,31 +20,12 @@ in
|
||||
|
||||
assert assertMsg (length badPlugins == 0) errorMsg;
|
||||
|
||||
runCommand
|
||||
(appendToName "with-plugins" package).name
|
||||
{
|
||||
nativeBuildInputs = [ package makeWrapper ];
|
||||
inherit package plugins;
|
||||
packageName = package.name;
|
||||
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
|
||||
} ''
|
||||
mkdir -p $out/$packageName/plugins
|
||||
for dir in $package/*; do
|
||||
cp -r $dir $out/
|
||||
done
|
||||
|
||||
# Install plugins
|
||||
appendToName "with-plugins" (package.overrideAttrs (oldAttrs: {
|
||||
passthru = { inherit plugins; };
|
||||
# TODO: Purely aesthetics, but link the plugin to its name instead of hash-name-version
|
||||
installPhase = oldAttrs.installPhase + ''
|
||||
for plugin in $plugins; do
|
||||
local pluginName=$(basename $plugin)
|
||||
pluginName=''${pluginName#*-}
|
||||
pluginName=''${pluginName%-[0-9.]*}
|
||||
ln -s $plugin $out/$packageName/plugins/$pluginName
|
||||
ln -s "$plugin" "$out/$name/plugins/$(basename $plugin)"
|
||||
done
|
||||
|
||||
# Fix up wrapper
|
||||
substituteInPlace $out/bin/* \
|
||||
--replace "$package" "$out"
|
||||
''
|
||||
'';
|
||||
}))
|
||||
|
@ -2,12 +2,10 @@ diff --git a/include/components/types.hpp b/include/components/types.hpp
|
||||
index 8125d4b..c435f4a 100644
|
||||
--- a/include/components/types.hpp
|
||||
+++ b/include/components/types.hpp
|
||||
@@ -57,7 +57,7 @@ enum class controltag {
|
||||
R, // Reset all open tags (B, F, T, o, u). Used at module edges
|
||||
@@ -43,5 +43,6 @@ enum class controltag {
|
||||
DOUBLE_MIDDLE,
|
||||
DOUBLE_RIGHT,
|
||||
+ EXTRA,
|
||||
// Terminator value, do not use
|
||||
BTN_COUNT,
|
||||
};
|
||||
|
||||
-enum class mousebtn { NONE = 0, LEFT, MIDDLE, RIGHT, SCROLL_UP, SCROLL_DOWN, DOUBLE_LEFT, DOUBLE_MIDDLE, DOUBLE_RIGHT };
|
||||
+enum class mousebtn { NONE = 0, LEFT, MIDDLE, RIGHT, SCROLL_UP, SCROLL_DOWN, DOUBLE_LEFT, DOUBLE_MIDDLE, DOUBLE_RIGHT, EXTRA };
|
||||
|
||||
enum class strut {
|
||||
LEFT = 0,
|
||||
|
48
pkgs/applications/networking/protonmail-bridge/common.nix
Normal file
48
pkgs/applications/networking/protonmail-bridge/common.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildGoModule
|
||||
, pkg-config
|
||||
, libsecret
|
||||
}:
|
||||
|
||||
{ pname
|
||||
, tags
|
||||
, ...
|
||||
}@args:
|
||||
|
||||
buildGoModule (lib.recursiveUpdate args rec {
|
||||
inherit pname;
|
||||
version = "1.8.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ProtonMail";
|
||||
repo = "proton-bridge";
|
||||
rev = "br-${version}";
|
||||
sha256 = "1na8min9cmn82lpad58abw6837k303fr09l6cvzswaxs73f231ig";
|
||||
};
|
||||
|
||||
vendorSha256 = "1219xa1347877bfhnid15y6w9s4hf1czbrmll2iha4gpsmg066bb";
|
||||
|
||||
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = (args.buildInputs or [ ]) ++ [
|
||||
libsecret
|
||||
];
|
||||
|
||||
inherit tags;
|
||||
|
||||
ldflags = [
|
||||
"-X github.com/ProtonMail/proton-bridge/pkg/constants.Version=${version}"
|
||||
"-X github.com/ProtonMail/proton-bridge/pkg/constants.Revision=${version}"
|
||||
"-X github.com/ProtonMail/proton-bridge/pkg/constants.BuildDate=unknown"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Integrate ProtonMail paid account with any program that supports IMAP and SMTP";
|
||||
homepage = "https://protonmail.com";
|
||||
license = licenses.gpl3;
|
||||
plaforms = platforms.x86_64;
|
||||
};
|
||||
})
|
@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildGoModule
|
||||
|
||||
@ -9,60 +9,11 @@
|
||||
, qtbase
|
||||
, qtdoc
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
builder =
|
||||
{ pname
|
||||
, tags
|
||||
, ...
|
||||
}@args:
|
||||
|
||||
buildGoModule (stdenv.lib.recursiveUpdate args rec {
|
||||
inherit pname;
|
||||
version = "1.5.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ProtonMail";
|
||||
repo = "proton-bridge";
|
||||
rev = "br-${version}";
|
||||
sha256 = "1na8min9cmn82lpad58abw6837k303fr09l6cvzswaxs73f231ig";
|
||||
builder = import ./common.nix {
|
||||
inherit lib fetchFromGitHub buildGoModule libsecret pkg-config;
|
||||
};
|
||||
|
||||
vendorSha256 = "1219xa1347877bfhnid15y6w9s4hf1czbrmll2iha4gpsmg066bb";
|
||||
|
||||
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = (args.buildInputs or [ ]) ++ [
|
||||
libsecret
|
||||
];
|
||||
|
||||
buildFlagsArray =
|
||||
let
|
||||
t = "github.com/ProtonMail/proton-bridge/pkg/constants";
|
||||
in
|
||||
[
|
||||
"-tags=${tags}"
|
||||
''
|
||||
-ldflags=
|
||||
-X ${t}.Version=${version}
|
||||
-X ${t}.Revision=unknown
|
||||
-X ${t}.BuildDate=unknown
|
||||
''
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Integrate ProtonMail paid account with any program that supports IMAP and SMTP";
|
||||
homepage = "https://protonmail.com";
|
||||
license = licenses.gpl3;
|
||||
plaforms = platforms.x86_64;
|
||||
};
|
||||
});
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
protonmail-bridge = builder (import ./app.nix { inherit qtbase go goModules; });
|
||||
protonmail-bridge-headless = builder (import ./headless.nix { });
|
||||
|
@ -1,30 +1,17 @@
|
||||
{}:
|
||||
|
||||
rec {
|
||||
{
|
||||
pname = "protonmail-bridge-headless";
|
||||
|
||||
tags = "pmapi_prod nogui";
|
||||
tags = [ "pmapi_prod" "nogui" ];
|
||||
|
||||
# FIXME: There's something fucky going on in the buildFlagsArray
|
||||
# substitution. I shouldn't need to do this.
|
||||
buildPhase =
|
||||
let
|
||||
t = "github.com/ProtonMail/proton-bridge/pkg/constants";
|
||||
in
|
||||
''
|
||||
runHook preBuild
|
||||
|
||||
go install \
|
||||
-tags="${tags}" \
|
||||
-ldflags="-X ${t}.Version=1.3.2 -X ${t}.Revision=unknown -X ${t}.BuildDate=unknown" \
|
||||
cmd/Desktop-Bridge/main.go
|
||||
mv $GOPATH/bin/main $GOPATH/bin/Desktop-Bridge
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
# REVIEW: Some issue with IMAP tests that probably fail due to network
|
||||
# sandboxing.
|
||||
doCheck = false;
|
||||
|
||||
# Fix up name.
|
||||
postInstall = ''
|
||||
mv $out/bin/Desktop-Bridge $out/bin/protonmail-bridge
|
||||
mv $out/bin/Import-Export $out/bin/protonmail-import-export
|
||||
'';
|
||||
}
|
||||
|
@ -4,38 +4,30 @@
|
||||
, jetbrainsPlatforms
|
||||
}:
|
||||
|
||||
{ plugid
|
||||
{ pluginId
|
||||
, pname
|
||||
, version
|
||||
, ...
|
||||
}@args:
|
||||
, versionId
|
||||
, sha256
|
||||
, filename ? "${pname}-${version}.zip"
|
||||
}:
|
||||
|
||||
let
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
defaultMeta = {
|
||||
broken = false;
|
||||
} // lib.optionalAttrs ((args.src.meta.homepage or "") != "") {
|
||||
homepage = args.src.meta.homepage;
|
||||
} // lib.optionalAttrs ((args.src.meta.description or "") != "") {
|
||||
description = args.src.meta.description;
|
||||
} // lib.optionalAttrs ((args.src.meta.license or {}) != {}) {
|
||||
license = args.src.meta.license;
|
||||
src = fetchzip {
|
||||
inherit sha256;
|
||||
url = "https://plugins.jetbrains.com/files/${toString pluginId}/${toString versionId}/${filename}";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation (args // {
|
||||
passthru = { inherit jetbrainsPlatforms; };
|
||||
|
||||
dontUnpack = lib.any (lib.hasSuffix ".jar") args.src.urls;
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -r * $out/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
inherit (args.meta) license description;
|
||||
homepage = if (args.meta.homepage == "") then null else args.meta.homepage;
|
||||
homepage = "https://plugins.jetbrains.com/plugin/${pluginId}-${lib.toLower pname}";
|
||||
};
|
||||
})
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildGoModule
|
||||
, makeWrapper
|
||||
@ -59,9 +59,10 @@ buildGoModule rec {
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/therecipe/qt";
|
||||
description = "Qt bindings for Go";
|
||||
license = licenses.lgpl3;
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
}:
|
||||
@ -14,9 +14,9 @@ buildPythonPackage rec {
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
homepage = "https://stuffivelearned.org/doku.php?id=programming:python:py-sonic";
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
license = licenses.gpl3;
|
||||
description = "A python wrapper library for the Subsonic REST API";
|
||||
};
|
||||
}
|
||||
|
@ -1,16 +1,18 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
|
||||
, qtbase
|
||||
, qmake
|
||||
, wrapQtAppsHook ? null # Temporary backwards compatibility
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "radeon-profile-daemon";
|
||||
version = "20190603.g06qxq2h";
|
||||
|
||||
nativeBuildInputs = [ qmake ];
|
||||
buildInputs = [ qtbase ];
|
||||
nativeBuildInputs = [ qmake wrapQtAppsHook ];
|
||||
|
||||
src = (
|
||||
fetchFromGitHub {
|
||||
@ -26,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||
--replace "/usr/" "$out/"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "System daemon for reading current clocks of AMD Radeon cards";
|
||||
homepage = "https://github.com/marazmista/radeon-profile-daemon";
|
||||
license = licenses.gpl2Plus;
|
||||
|
@ -1,61 +1,14 @@
|
||||
{ pkgs }:
|
||||
|
||||
rec {
|
||||
# Alacritty with the unmerged ligature patches applied.
|
||||
alacritty-ligatures = pkgs.alacritty.overrideAttrs (oldAttrs: rec {
|
||||
pname = "${oldAttrs.pname}-ligatures";
|
||||
version = "0.7.1.20210107.gada2680";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zenixls2";
|
||||
repo = "alacritty";
|
||||
fetchSubmodules = true;
|
||||
rev = "ada2680e79a8f53cd350263c8cc91d2e2a264d81";
|
||||
sha256 = "0c0k1ib1dl35731zyjb32apyn28xc63mhbwsig5mz3hnkyk5nisr";
|
||||
};
|
||||
|
||||
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (pkgs.lib.const {
|
||||
name = "${pname}-${version}-vendor.tar.gz";
|
||||
inherit src;
|
||||
outputHash = "1d1yz4xmal0f3c0pcn59lxfh5a3532nv7dv7s95svvi8qsvnk9gv";
|
||||
});
|
||||
|
||||
ligatureInputs = [
|
||||
pkgs.fontconfig
|
||||
pkgs.freetype
|
||||
pkgs.libglvnd
|
||||
pkgs.stdenv.cc.cc.lib
|
||||
pkgs.xlibs.libxcb
|
||||
];
|
||||
|
||||
buildInputs = (oldAttrs.buildInputs or []) ++ ligatureInputs;
|
||||
|
||||
# HACK: One of the ligature libraries required the C++ stdlib at runtime,
|
||||
# and I can't work out a better way to push it to the RPATH.
|
||||
postInstall = pkgs.lib.optional (!pkgs.stdenv.isDarwin) ''
|
||||
patchelf \
|
||||
--set-rpath ${pkgs.lib.makeLibraryPath ligatureInputs}:"$(patchelf --show-rpath $out/bin/alacritty)" \
|
||||
$out/bin/alacritty
|
||||
'';
|
||||
|
||||
meta = oldAttrs.meta // {
|
||||
description = "Alacritty with ligature patch applied";
|
||||
homepage = "https://github.com/zenixls2/alacritty/tree/ligature";
|
||||
};
|
||||
});
|
||||
|
||||
amdgpu-fan = pkgs.callPackage ../tools/misc/amdgpu-fan { };
|
||||
|
||||
cardboard = pkgs.callPackage ../applications/window-managers/cardboard { };
|
||||
|
||||
goModules = pkgs.recurseIntoAttrs rec {
|
||||
qt = pkgs.libsForQt512.callPackage ../development/go-modules/qt { };
|
||||
qt = pkgs.libsForQt5.callPackage ../development/go-modules/qt { };
|
||||
};
|
||||
|
||||
# A functional Jetbrains IDE-with-plugins package set.
|
||||
jetbrains = pkgs.dontRecurseIntoAttrs rec {
|
||||
jetbrainsPluginsFor = variant: import ../top-level/jetbrains-plugins.nix {
|
||||
inherit (pkgs) lib newScope stdenv fetchzip makeWrapper runCommand;
|
||||
inherit (pkgs) lib newScope stdenv fetchzip;
|
||||
inherit variant;
|
||||
};
|
||||
|
||||
@ -72,15 +25,11 @@ rec {
|
||||
ideaUltimateWithPlugins = ideaUltimatePlugins.jetbrainsWithPlugins;
|
||||
};
|
||||
|
||||
libhl = pkgs.callPackage ../development/libraries/libhl { };
|
||||
|
||||
mopidy-subidy = pkgs.callPackage ../applications/audio/mopidy/subidy.nix {
|
||||
python3Packages = pkgs.python3Packages // python3Packages;
|
||||
};
|
||||
|
||||
pam_gnupg = pkgs.callPackage ../os-specific/linux/pam_gnupg { };
|
||||
|
||||
picom-animations = pkgs.picom.overrideAttrs (oldAttrs: {
|
||||
picom-animations = pkgs.picom.overrideAttrs (_oldAttrs: {
|
||||
pname = "picom-animations";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jonaburg";
|
||||
@ -96,74 +45,17 @@ rec {
|
||||
patches = (oldAttrs.patches or [ ]) ++ [ ../applications/misc/polybar/9button.patch ];
|
||||
});
|
||||
|
||||
psst = pkgs.callPackage ../applications/audio/psst { };
|
||||
|
||||
python2Packages =
|
||||
let
|
||||
fixVersion =
|
||||
{ package
|
||||
, version
|
||||
, sha256
|
||||
, extra ? (oldAttrs: { })
|
||||
}: package.overrideAttrs (oldAttrs: rec {
|
||||
inherit version;
|
||||
src = pkgs.python2Packages.fetchPypi {
|
||||
inherit (oldAttrs) pname;
|
||||
inherit version sha256;
|
||||
};
|
||||
} // extra oldAttrs);
|
||||
in
|
||||
pkgs.recurseIntoAttrs rec {
|
||||
colorama_0_3_3 = fixVersion {
|
||||
package = pkgs.python2Packages.colorama;
|
||||
version = "0.3.3";
|
||||
sha256 = "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb";
|
||||
};
|
||||
|
||||
mutagen_1_30 = fixVersion {
|
||||
package = pkgs.python2Packages.mutagen;
|
||||
version = "1.30";
|
||||
sha256 = "0kv2gjnzbj1w0bswmxm7wi05x6ypi7jk52s0lb8gw8s459j41gyd";
|
||||
extra = oldAttrs: {
|
||||
patches = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
pyspotify_2_0_5 = fixVersion {
|
||||
package = pkgs.python2Packages.pyspotify;
|
||||
version = "2.0.5";
|
||||
sha256 = "0y16c024rrvbvfdqj1n0k4b25b1nbza3i7kspg5b0ci2src1rm7v";
|
||||
};
|
||||
|
||||
overlay = {
|
||||
colorama = colorama_0_3_3;
|
||||
mutagen = mutagen_1_30;
|
||||
pyspotify = pyspotify_2_0_5;
|
||||
};
|
||||
};
|
||||
|
||||
python3Packages = pkgs.recurseIntoAttrs {
|
||||
py-sonic = pkgs.python3.pkgs.callPackage ../development/python-modules/py-sonic { };
|
||||
};
|
||||
|
||||
# The one in Nixpkgs still extracts the pre-built Debian package instead
|
||||
# of building from source.
|
||||
protonmailBridgePackages = pkgs.libsForQt512.callPackage ../applications/networking/protonmail-bridge {
|
||||
protonmailBridgePackages = pkgs.libsForQt5.callPackage ../applications/networking/protonmail-bridge {
|
||||
inherit goModules;
|
||||
};
|
||||
protonmail-bridge = protonmailBridgePackages.protonmail-bridge;
|
||||
protonmail-bridge-headless = protonmailBridgePackages.protonmail-bridge-headless;
|
||||
|
||||
radeon-profile-daemon = pkgs.libsForQt5.callPackage ../tools/misc/radeon-profile-daemon { };
|
||||
|
||||
samrewritten = pkgs.callPackage ../tools/misc/samrewritten { };
|
||||
|
||||
spotify-ripper = pkgs.callPackage ../tools/misc/spotify-ripper {
|
||||
# NOTE: Not available in 20.03. Specifying it this way lets me cheat the
|
||||
# build auto-failing on 20.03 because of the attribute not existing.
|
||||
inherit (pkgs) fdk-aac-encoder;
|
||||
python2Packages = pkgs.python2Packages // python2Packages.overlay;
|
||||
};
|
||||
|
||||
zsh-z = pkgs.callPackage ../shells/zsh/zsh-z { };
|
||||
}
|
||||
|
@ -2,28 +2,34 @@
|
||||
, newScope
|
||||
, stdenv
|
||||
, fetchzip
|
||||
, makeWrapper
|
||||
, runCommand
|
||||
|
||||
, variant
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
mkJetbrainsPlugins = import ../applications/editors/jetbrains/common-plugins.nix {
|
||||
inherit lib stdenv fetchzip;
|
||||
};
|
||||
|
||||
mkIdeaPlugins = import ../applications/editors/jetbrains/idea-plugins.nix {
|
||||
inherit lib stdenv fetchzip;
|
||||
};
|
||||
|
||||
jetbrainsWithPlugins = import ../applications/editors/jetbrains/wrapper.nix {
|
||||
inherit lib makeWrapper runCommand;
|
||||
inherit lib;
|
||||
};
|
||||
|
||||
in lib.makeScope newScope (self: lib.makeOverridable ({
|
||||
ideaPlugins ? mkIdeaPlugins self
|
||||
}: ({ }
|
||||
in
|
||||
lib.makeScope newScope (self: lib.makeOverridable
|
||||
({ jetbrainsPlugins ? mkJetbrainsPlugins self
|
||||
, ideaPlugins ? mkIdeaPlugins self
|
||||
}: ({ }
|
||||
// jetbrainsPlugins // { inherit jetbrainsPlugins; }
|
||||
// ideaPlugins // { inherit ideaPlugins; }
|
||||
// {
|
||||
inherit variant;
|
||||
jetbrainsWithPlugins = jetbrainsWithPlugins self variant;
|
||||
})
|
||||
) { })
|
||||
)
|
||||
{ })
|
||||
|
55
pkgs/unit/al/alacritty-ligatures/package.nix
Normal file
55
pkgs/unit/al/alacritty-ligatures/package.nix
Normal file
@ -0,0 +1,55 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
|
||||
, alacritty
|
||||
|
||||
, fontconfig
|
||||
, freetype
|
||||
, libglvnd
|
||||
, libxcb
|
||||
}:
|
||||
|
||||
alacritty.overrideAttrs (oldAttrs: rec {
|
||||
pname = "${oldAttrs.pname}-ligatures";
|
||||
version = "0.7.2.20210209.g3ed0430";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zenixls2";
|
||||
repo = "alacritty";
|
||||
fetchSubmodules = true;
|
||||
rev = "3ed043046fc74f288d4c8fa7e4463dc201213500";
|
||||
sha256 = "1dGk4ORzMSUQhuKSt5Yo7rOJCJ5/folwPX2tLiu0suA=";
|
||||
};
|
||||
|
||||
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (lib.const {
|
||||
name = "${pname}-${version}-vendor.tar.gz";
|
||||
inherit src;
|
||||
outputHash = "pONu6caJmEKnbr7j+o9AyrYNpS4Q8OEjNZOhGTalncc=";
|
||||
});
|
||||
|
||||
ligatureInputs = [
|
||||
fontconfig
|
||||
freetype
|
||||
libglvnd
|
||||
stdenv.cc.cc.lib
|
||||
libxcb
|
||||
];
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
||||
buildInputs = (oldAttrs.buildInputs or [ ]) ++ ligatureInputs;
|
||||
|
||||
# HACK: One of the ligature libraries required the C++ stdlib at runtime,
|
||||
# and I can't work out a better way to push it to the RPATH.
|
||||
postInstall = lib.optional (!stdenv.isDarwin) ''
|
||||
patchelf \
|
||||
--set-rpath ${lib.makeLibraryPath ligatureInputs}:"$(patchelf --print-rpath $out/bin/alacritty)" \
|
||||
$out/bin/alacritty
|
||||
'';
|
||||
|
||||
meta = oldAttrs.meta // {
|
||||
description = "Alacritty with ligature patch applied";
|
||||
homepage = "https://github.com/zenixls2/alacritty/tree/ligature";
|
||||
};
|
||||
})
|
@ -1,4 +1,4 @@
|
||||
{ stdenv
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
|
||||
, python3Packages
|
||||
@ -20,7 +20,12 @@ python3Packages.buildPythonApplication rec {
|
||||
pyyaml
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
patchPhase = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace PROJECTVERSION "${version}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fan controller for AMD graphics cards running the amdgpu driver on Linux";
|
||||
homepage = "https://github.com/chestm007/amdgpu-fan";
|
||||
license = licenses.gpl2;
|
45
pkgs/unit/at/atlauncher/package.nix
Normal file
45
pkgs/unit/at/atlauncher/package.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, makeWrapper
|
||||
, jre
|
||||
, udev
|
||||
, xorg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "atlauncher";
|
||||
version = "3.4.20.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ATLauncher/ATLauncher/releases/download/v${version}/ATLauncher-${version}.jar";
|
||||
hash = "sha256-YnCDs67BVhJ5rwY6jTbfgHKPbavtmcIMd16AWMBUDgk=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/java
|
||||
cp $src $out/share/java/ATLauncher.jar
|
||||
makeWrapper ${jre}/bin/java $out/bin/atlauncher \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xorg.libXxf86vm udev ]}" \
|
||||
--add-flags "-jar $out/share/java/ATLauncher.jar" \
|
||||
--add-flags "--working-dir \''${XDG_DATA_HOME:-\$HOME/.local/share}/ATLauncher"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Minecraft launcher";
|
||||
longDescription = ''
|
||||
ATLauncher is a Launcher for Minecraft which integrates multiple different
|
||||
ModPacks to allow you to download and install ModPacks easily and quickly.
|
||||
'';
|
||||
sourceProvenance = [
|
||||
(lib.sourceTypes.binaryBytecode or { shortName = "binaryBytecode"; isSource = false; })
|
||||
];
|
||||
license = lib.licenses.gpl3Only;
|
||||
platforms = lib.platforms.all;
|
||||
homepage = "https://atlauncher.com/";
|
||||
};
|
||||
}
|
@ -1,15 +1,12 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, fetchzip
|
||||
|
||||
, cereal
|
||||
, cmake
|
||||
, git
|
||||
, libGL
|
||||
, libX11
|
||||
, libinput
|
||||
, libxkbcommon
|
||||
, mesa
|
||||
, meson
|
||||
, ninja
|
||||
, pixman
|
||||
@ -62,10 +59,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
passthru.providedSessions = [ "cardboard" ];
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "Scrollable tiling Wayland compositor designed with laptops in mind";
|
||||
homepage = "https://gitlab.com/cardboardwm/cardboard";
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
license = licenses.gpl3;
|
||||
platforms = wlroots.meta.platforms;
|
||||
broken = true;
|
||||
};
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
|
||||
, coreutils
|
||||
, autoreconfHook
|
||||
}:
|
||||
|
||||
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/include $out/lib
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/xant/libhl";
|
||||
description = "Simple and fast C library implementing a thread-safe API to manage hash-tables, linked lists, lock-free ring buffers and queues ";
|
||||
license = licenses.lgpl3;
|
@ -1,4 +1,5 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
|
||||
, autoreconfHook
|
||||
@ -25,10 +26,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
configureFlags = [ "--with-moduledir=\${out}/lib/security" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/cruegge/pam-gnupg";
|
||||
description = "Unlock GnuPG keys on login";
|
||||
license = licenses.gpl3;
|
||||
inherit (pam.meta) platforms;
|
||||
platforms = pam.meta.platforms;
|
||||
};
|
||||
}
|
@ -1,9 +1,10 @@
|
||||
{ stdenv
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
|
||||
, cmake
|
||||
, pkg-config
|
||||
, alsaLib
|
||||
, dbus
|
||||
, openssl
|
||||
|
||||
# GUI
|
||||
@ -14,27 +15,27 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (stdenv.lib) optional optionals;
|
||||
inherit (lib) optional optionals;
|
||||
in
|
||||
|
||||
assert withGui -> gtk3.meta.available;
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "psst";
|
||||
version = "20210122.gec114ac";
|
||||
version = "20221012.d70ed81";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jpochyla";
|
||||
repo = "psst";
|
||||
rev = "ec114ac8299179c8dd51bc026d6060dc75658b83";
|
||||
sha256 = "02mh6hjnlimadc3w899hccss31p1r4sxgb5880zwn7yiycbq3yyj";
|
||||
rev = "d70ed8104533dc15bc36b989ba8428872c9b578f";
|
||||
hash = "sha256-ZKhHN0ruLb6ZVKkrKv/YawRsVop6SP1QF/nrtkmA8P8=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
cargoSha256 = "1m01rycnpy9asspih1x9l5ppfbjnqcfdycmzgkrmdwzah3x8s8xc";
|
||||
cargoSha256 = "sha256-zH6+EV78FDVOYEFXk0f54pH2Su0QpK1I0bHqzIiMdBo=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
++ optional withGui copyDesktopItems;
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
buildInputs = [ alsaLib dbus openssl ]
|
||||
++ optional withGui gtk3;
|
||||
|
||||
cargoBuildFlags = optionals (!withGui) [
|
||||
@ -54,16 +55,16 @@ rustPlatform.buildRustPackage rec {
|
||||
name = pname;
|
||||
desktopName = "psst";
|
||||
genericName = "Spotify Player";
|
||||
categories = "AudioVideo;Audio;Network;Player;";
|
||||
categories = [ "AudioVideo" "Audio" "Network" "Player" ];
|
||||
comment = "Spotify client with native GUI";
|
||||
exec = "psst-gui";
|
||||
extraEntries = "Keywords=spotify;music;";
|
||||
keywords = [ "spotify" "music" ];
|
||||
icon = "spotify";
|
||||
type = "Application";
|
||||
})
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Fast and multi-platform Spotify client with native GUI ";
|
||||
homepage = "https://github.com/jpochyla/psst";
|
||||
license = licenses.mit;
|
@ -1,7 +1,6 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
|
||||
, curl
|
||||
, gnumake
|
||||
, gnutls
|
||||
@ -40,7 +39,7 @@ stdenv.mkDerivation rec {
|
||||
--replace /usr/bin/samrewritten $out/bin/samrewritten
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Steam Achievement Manager For Linux";
|
||||
homepage = "https://github.com/PaulCombal/SamRewritten";
|
||||
license = licenses.gpl3;
|
@ -2,7 +2,7 @@ diff --git a/setup.py b/setup.py
|
||||
index a800b3b..8967921 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -22,14 +22,13 @@ setup(
|
||||
@@ -33,14 +33,13 @@ setup(
|
||||
name='spotify-ripper',
|
||||
version='2.9.1',
|
||||
packages=find_packages(exclude=["tests"]),
|
||||
@ -18,11 +18,7 @@ index a800b3b..8967921 100755
|
||||
],
|
||||
},
|
||||
|
||||
@@ -67,7 +66,5 @@ setup(
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
],
|
||||
- long_description=_read('README.rst'),
|
||||
)
|
||||
@@ -121,3 +121,2 @@ setup(
|
||||
return True
|
||||
|
||||
-create_default_dir()
|
@ -1,14 +1,22 @@
|
||||
{ stdenv
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
|
||||
, python2Packages
|
||||
, python3Packages
|
||||
, lame
|
||||
|
||||
, aacSupport ? false, faac
|
||||
, alacSupport ? false, libav
|
||||
, flacSupport ? false, flac
|
||||
, m4aSupport ? false, mp4Support ? false, fdk-aac-encoder
|
||||
, oggSupport ? false, vorbisTools
|
||||
, opusSupport ? false, opusTools
|
||||
, aacSupport ? false
|
||||
, faac
|
||||
, alacSupport ? false
|
||||
, libav
|
||||
, flacSupport ? false
|
||||
, flac
|
||||
, m4aSupport ? false
|
||||
, mp4Support ? false
|
||||
, fdk-aac-encoder
|
||||
, oggSupport ? false
|
||||
, vorbisTools
|
||||
, opusSupport ? false
|
||||
, opusTools
|
||||
}:
|
||||
|
||||
assert aacSupport -> faac.meta.available;
|
||||
@ -18,25 +26,27 @@ assert m4aSupport || mp4Support -> fdk-aac-encoder.meta.available;
|
||||
assert oggSupport -> vorbisTools.meta.available;
|
||||
assert opusSupport -> opusTools.meta.available;
|
||||
|
||||
python2Packages.buildPythonApplication rec {
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "spotify-ripper";
|
||||
version = "20161231.gd046419";
|
||||
version = "20210724.5bfd3f7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hbashton";
|
||||
owner = "ast261";
|
||||
repo = pname;
|
||||
rev = "d0464193dead7bd3ac7580e98bde86a0f323acae";
|
||||
sha256 = "003d6br20f1cf4qvmpl62bk0k4h4v66ib76wn36c23bnh9x5q806";
|
||||
rev = "5bfd3f7a52f2767b433fd315145409837a3c33f0";
|
||||
sha256 = "sha256-LLunGzs9Mg4S00Su260b+M5w/XwS+kICl/YXQdR/cPI=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = (with python2Packages; [
|
||||
propagatedBuildInputs = (with python3Packages; [
|
||||
colorama
|
||||
mutagen
|
||||
pyspotify
|
||||
requests
|
||||
schedule
|
||||
setuptools
|
||||
spotipy
|
||||
]) ++ [
|
||||
lame
|
||||
(if flacSupport then flac else null)
|
||||
(if alacSupport then libav else null)
|
||||
(if aacSupport then faac else null)
|
||||
@ -48,7 +58,7 @@ python2Packages.buildPythonApplication rec {
|
||||
# Remove impure executables.
|
||||
patches = [ ./fix-setup.patch ];
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "Rip Spotify URIs to audio files, including ID3 tags and cover art";
|
||||
longDescription = ''
|
||||
Spotify-ripper is a small ripper script for Spotify that rips Spotify URIs
|
||||
@ -58,6 +68,6 @@ python2Packages.buildPythonApplication rec {
|
||||
'';
|
||||
homepage = "https://github.com/hbashton/spotify-ripper";
|
||||
# spotify-ripper itself is MIT, but the upstream libspotify is unfree.
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
license = licenses.unfree;
|
||||
};
|
||||
}
|
37
pkgs/unit/yt/ytarchive/package.nix
Normal file
37
pkgs/unit/yt/ytarchive/package.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
|
||||
, python3
|
||||
, ffmpeg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ytarchive";
|
||||
version = "0.2.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Kethsar";
|
||||
repo = "ytarchive";
|
||||
rev = "v${version}";
|
||||
sha256 = "xT45FF0ztWQXzQgYztl2YKiI2iGJfnCXgCMw8gOmxzM=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
python3
|
||||
ffmpeg
|
||||
];
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm00755 ytarchive.py $out/bin/ytarchive
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Garbage Youtube livestream downloader";
|
||||
homepage = "https://github.com/Kethsar/ytarchive";
|
||||
license = licenses.mit;
|
||||
platforms = python3.meta.platforms;
|
||||
};
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
|
||||
@ -25,10 +26,10 @@ stdenv.mkDerivation {
|
||||
installShellCompletion --zsh _zshz
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = ''Jump quickly to directories that you have visited "frecently." A native ZSH port of z.sh.'';
|
||||
homepage = "https://github.com/agkozak/zsh-z";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
license = licenses.mit;
|
||||
platforms = zsh.meta.platforms;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user