Compare commits
No commits in common. "b75a0543ee42864c404b4824119b1500ef95f66d" and "76a27862c5a91fda6db35b69f5a733646f44e8bf" have entirely different histories.
b75a0543ee
...
76a27862c5
79
.drone.jsonnet
Normal file
79
.drone.jsonnet
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
local CacheVolume = "cache";
|
||||||
|
|
||||||
|
local Cache(name, settings) = {
|
||||||
|
name: name,
|
||||||
|
image: "drillster/drone-volume-cache",
|
||||||
|
volumes: [ {
|
||||||
|
name: CacheVolume,
|
||||||
|
path: "/cache"
|
||||||
|
} ],
|
||||||
|
settings: settings + {
|
||||||
|
mount: ["/nix/store"]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
local Pipeline(channel) = {
|
||||||
|
kind: "pipeline",
|
||||||
|
type: "docker",
|
||||||
|
name: channel,
|
||||||
|
// This is ignored by the drone-cli YAML translator, so unfortunately, it has
|
||||||
|
// to be copy-pasted into relevant steps.
|
||||||
|
environment: {
|
||||||
|
NIXPKGS_ALLOW_UNFREE: 1,
|
||||||
|
NUR_REPO: "xeals",
|
||||||
|
CACHIX_CACHE: "xeals",
|
||||||
|
CACHIX_SIGNING_KEY: { from_secret: "cachix_key" },
|
||||||
|
},
|
||||||
|
volumes: [ {
|
||||||
|
name: CacheVolume,
|
||||||
|
host: {
|
||||||
|
path: "/tmp/drone/cache"
|
||||||
|
}
|
||||||
|
} ],
|
||||||
|
steps: [
|
||||||
|
Cache("restore-nix-store", {
|
||||||
|
restore: true
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
name: "build",
|
||||||
|
image: "nixos/nix",
|
||||||
|
commands: [
|
||||||
|
"nix-channel --add https://nixos.org/channels/" + channel + " nixos",
|
||||||
|
"nix-channel --update",
|
||||||
|
"nix-build ci.nix -A buildOutputs",
|
||||||
|
"nix eval -f default.nix 'lib'",
|
||||||
|
"nix eval -f default.nix 'modules'",
|
||||||
|
"nix eval -f default.nix 'overlays'"
|
||||||
|
],
|
||||||
|
environment: {
|
||||||
|
NIXPKGS_ALLOW_UNFREE: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "deploy",
|
||||||
|
image: "nixpkgs/cachix",
|
||||||
|
commands: [
|
||||||
|
'nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}"'//,
|
||||||
|
// 'if [[ "cron" != "${DRONE_BUILD_EVENT}" && -z "${DRONE_PULL_REQUEST}" && "master" = "${DRONE_BRANCH}" ]]; then
|
||||||
|
// curl -XPOST "https://nur-update.herokuapp.com/update?repo=${NUR_REPO}"; fi'
|
||||||
|
],
|
||||||
|
environment: {
|
||||||
|
NIXPKGS_ALLOW_UNFREE: 1,
|
||||||
|
NUR_REPO: "xeals",
|
||||||
|
CACHIX_CACHE: "xeals",
|
||||||
|
CACHIX_SIGNING_KEY: { from_secret: "cachix_key" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Cache("save-nix-store", {
|
||||||
|
rebuild: true
|
||||||
|
}) + {
|
||||||
|
when: { status: [ "success", "failure" ] }
|
||||||
|
},
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
[
|
||||||
|
Pipeline("nixpkgs-unstable"),
|
||||||
|
Pipeline("nixos-unstable"),
|
||||||
|
Pipeline("nixos-20.03"),
|
||||||
|
]
|
187
.drone.yml
Normal file
187
.drone.yml
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: nixpkgs-unstable
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: restore-nix-store
|
||||||
|
image: drillster/drone-volume-cache
|
||||||
|
settings:
|
||||||
|
mount:
|
||||||
|
- /nix/store
|
||||||
|
restore: true
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
image: nixos/nix
|
||||||
|
commands:
|
||||||
|
- nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixos
|
||||||
|
- nix-channel --update
|
||||||
|
- nix-build ci.nix -A buildOutputs
|
||||||
|
- nix eval -f default.nix 'lib'
|
||||||
|
- nix eval -f default.nix 'modules'
|
||||||
|
- nix eval -f default.nix 'overlays'
|
||||||
|
environment:
|
||||||
|
NIXPKGS_ALLOW_UNFREE: 1
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
image: nixpkgs/cachix
|
||||||
|
commands:
|
||||||
|
- nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}"
|
||||||
|
environment:
|
||||||
|
CACHIX_CACHE: xeals
|
||||||
|
CACHIX_SIGNING_KEY:
|
||||||
|
from_secret: cachix_key
|
||||||
|
NIXPKGS_ALLOW_UNFREE: 1
|
||||||
|
NUR_REPO: xeals
|
||||||
|
|
||||||
|
- name: save-nix-store
|
||||||
|
image: drillster/drone-volume-cache
|
||||||
|
settings:
|
||||||
|
mount:
|
||||||
|
- /nix/store
|
||||||
|
rebuild: true
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
host:
|
||||||
|
path: /tmp/cache
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: nixos-unstable
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: restore-nix-store
|
||||||
|
image: drillster/drone-volume-cache
|
||||||
|
settings:
|
||||||
|
mount:
|
||||||
|
- /nix/store
|
||||||
|
restore: true
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
image: nixos/nix
|
||||||
|
commands:
|
||||||
|
- nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
||||||
|
- nix-channel --update
|
||||||
|
- nix-build ci.nix -A buildOutputs
|
||||||
|
- nix eval -f default.nix 'lib'
|
||||||
|
- nix eval -f default.nix 'modules'
|
||||||
|
- nix eval -f default.nix 'overlays'
|
||||||
|
environment:
|
||||||
|
NIXPKGS_ALLOW_UNFREE: 1
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
image: nixpkgs/cachix
|
||||||
|
commands:
|
||||||
|
- nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}"
|
||||||
|
environment:
|
||||||
|
CACHIX_CACHE: xeals
|
||||||
|
CACHIX_SIGNING_KEY:
|
||||||
|
from_secret: cachix_key
|
||||||
|
NIXPKGS_ALLOW_UNFREE: 1
|
||||||
|
NUR_REPO: xeals
|
||||||
|
|
||||||
|
- name: save-nix-store
|
||||||
|
image: drillster/drone-volume-cache
|
||||||
|
settings:
|
||||||
|
mount:
|
||||||
|
- /nix/store
|
||||||
|
rebuild: true
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
host:
|
||||||
|
path: /tmp/cache
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: nixos-20.03
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: restore-nix-store
|
||||||
|
image: drillster/drone-volume-cache
|
||||||
|
settings:
|
||||||
|
mount:
|
||||||
|
- /nix/store
|
||||||
|
restore: true
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
image: nixos/nix
|
||||||
|
commands:
|
||||||
|
- nix-channel --add https://nixos.org/channels/nixos-20.03 nixos
|
||||||
|
- nix-channel --update
|
||||||
|
- nix-build ci.nix -A buildOutputs
|
||||||
|
- nix eval -f default.nix 'lib'
|
||||||
|
- nix eval -f default.nix 'modules'
|
||||||
|
- nix eval -f default.nix 'overlays'
|
||||||
|
environment:
|
||||||
|
NIXPKGS_ALLOW_UNFREE: 1
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
image: nixpkgs/cachix
|
||||||
|
commands:
|
||||||
|
- nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}"
|
||||||
|
environment:
|
||||||
|
CACHIX_CACHE: xeals
|
||||||
|
CACHIX_SIGNING_KEY:
|
||||||
|
from_secret: cachix_key
|
||||||
|
NIXPKGS_ALLOW_UNFREE: 1
|
||||||
|
NUR_REPO: xeals
|
||||||
|
|
||||||
|
- name: save-nix-store
|
||||||
|
image: drillster/drone-volume-cache
|
||||||
|
settings:
|
||||||
|
mount:
|
||||||
|
- /nix/store
|
||||||
|
rebuild: true
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
host:
|
||||||
|
path: /tmp/cache
|
||||||
|
|
||||||
|
...
|
29
.travis.yml
29
.travis.yml
@ -1,29 +1,40 @@
|
|||||||
version: ~> 1.0
|
version: ~> 1.0
|
||||||
import: nix-community/nix-travis-ci:nix.yml@main
|
import: nix-community/nix-travis-ci:nix.yml@main
|
||||||
|
|
||||||
dist: xenial
|
sudo: false
|
||||||
os: linux
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- CACHIX_CACHE="xeals"
|
# Set this to cache your build results in cachix for faster builds
|
||||||
- NIXPKGS_ALLOW_UNFREE="1"
|
# in travis and for everyone who uses your cache.
|
||||||
- NUR_REPO="xeals"
|
#
|
||||||
|
# Format: Your cachix cache host name without the ".cachix.org" suffix.
|
||||||
|
# Example: mycache (for mycache.cachix.org)
|
||||||
|
#
|
||||||
|
# For this to work, you also need to set the CACHIX_SIGNING_KEY
|
||||||
|
# in your repository settings in Travis.
|
||||||
|
# - CACHIX_CACHE=
|
||||||
|
# Set this to notify the global nur package registry that changes are
|
||||||
|
# available.
|
||||||
|
#
|
||||||
|
# The repo name as used in
|
||||||
|
# https://github.com/nix-community/NUR/blob/master/repos.json
|
||||||
|
- NUR_REPO="<YOUR_NUR_REPO_NAME_HERE>"
|
||||||
|
|
||||||
jobs:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- env: NIX_PATH=nixpkgs=channel:nixpkgs-unstable
|
- env: NIX_PATH=nixpkgs=channel:nixpkgs-unstable
|
||||||
- env: NIX_PATH=nixpkgs=channel:nixos-unstable
|
- env: NIX_PATH=nixpkgs=channel:nixos-unstable
|
||||||
- env: NIX_PATH=nixpkgs=channel:nixos-20.03
|
- env: NIX_PATH=nixpkgs=channel:nixos-20.03
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- nix-build ci.nix -kA buildOutputs
|
- nix-build ci.nix -A buildOutputs
|
||||||
- nix eval -f default.nix 'lib'
|
- nix eval -f default.nix 'lib'
|
||||||
- nix eval -f default.nix 'modules'
|
- nix eval -f default.nix 'modules'
|
||||||
- nix eval -f default.nix 'overlays'
|
- nix eval -f default.nix 'overlays'
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- if [ -n "${CACHIX_CACHE}" ]; then nix-build ci.nix -kA cacheOutputs | cachix push "${CACHIX_CACHE}"; fi
|
- if [ -n "${CACHIX_CACHE}" ]; then nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}"; fi
|
||||||
- if [[ "cron" != "${TRAVIS_EVENT_TYPE}" && "false" = "${TRAVIS_PULL_REQUEST}" && "master" = "${TRAVIS_BRANCH}" ]]; then
|
- if [[ NUR_REPO != "<YOUR_NUR_REPO_NAME_HERE>" && "cron" != "${TRAVIS_EVENT_TYPE}" && "false" = "${TRAVIS_PULL_REQUEST}" && "master" = "${TRAVIS_BRANCH}" ]]; then
|
||||||
curl -XPOST "https://nur-update.herokuapp.com/update?repo=${NUR_REPO}"; fi
|
curl -XPOST "https://nur-update.herokuapp.com/update?repo=${NUR_REPO}"; fi
|
||||||
|
|
||||||
|
69
README.md
69
README.md
@ -1,46 +1,37 @@
|
|||||||
|
# nur-packages-template
|
||||||
|
|
||||||
|
**A template for [NUR](https://github.com/nix-community/NUR) repositories**
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
1. Click on [Use this template](https://github.com/nix-community/nur-packages-template/generate) to start a repo based on this template. (Do _not_ fork it.)
|
||||||
|
2. Add your packages to the [pkgs](./pkgs) directory and to
|
||||||
|
[default.nix](./default.nix)
|
||||||
|
* Remember to mark the broken packages as `broken = true;` in the `meta`
|
||||||
|
attribute, or travis (and consequently caching) will fail!
|
||||||
|
* Library functions, modules and overlays go in the respective directories
|
||||||
|
3. Choose your CI: Depending on your preference you can use github actions (recommended) or [Travis ci](https://travis-ci.com).
|
||||||
|
- Github actions: Change your NUR repo name and optionally add a cachix name in [.github/workflows/build.yml](./.github/workflows/build.yml) and change the cron timer
|
||||||
|
to a random value as described in the file
|
||||||
|
- Travis ci: Change your NUR repo name and optionally your cachix repo name in
|
||||||
|
[.travis.yml](./.travis.yml). Than enable travis in your repo. You can add a cron job in the repository settings on travis to keep your cachix cache fresh
|
||||||
|
5. Change your travis and cachix names on the README template section and delete
|
||||||
|
the rest
|
||||||
|
6. [Add yourself to NUR](https://github.com/nix-community/NUR#how-to-add-your-own-repository)
|
||||||
|
|
||||||
|
## README template
|
||||||
|
|
||||||
# nur-packages
|
# nur-packages
|
||||||
|
|
||||||
**My personal [NUR](https://github.com/nix-community/NUR) repository**
|
**My personal [NUR](https://github.com/nix-community/NUR) repository**
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.com/xeals/nur-packages.svg?branch=master)](https://travis-ci.com/xeals/nur-packages)
|
<!-- Remove this if you don't use github actions -->
|
||||||
[![Cachix Cache](https://img.shields.io/badge/cachix-xeals-blue.svg)](https://xeals.cachix.org)
|
![Build and populate cache](https://github.com/nix-community/<YOUR-GITHUB-USER>/workflows/Build%20and%20populate%20cache/badge.svg)
|
||||||
|
|
||||||
## Noteworthy packages
|
<!--
|
||||||
|
Uncomment this if you use travis:
|
||||||
|
|
||||||
### Jetbrains with plugins
|
[![Build Status](https://travis-ci.com/<YOUR_TRAVIS_USERNAME>/nur-packages.svg?branch=master)](https://travis-ci.com/<YOUR_TRAVIS_USERNAME>/nur-packages)
|
||||||
|
-->
|
||||||
|
[![Cachix Cache](https://img.shields.io/badge/cachix-<YOUR_CACHIX_CACHE_NAME>-blue.svg)](https://<YOUR_CACHIX_CACHE_NAME>.cachix.org)
|
||||||
|
|
||||||
A fan of the Emacs/Vim/VSCode plugin builder? Now enjoy it with your favourite Jetbrains IDE!
|
|
||||||
|
|
||||||
The system is mostly proof-of-concept and there are a couple of issues with it at the moment, but it works for what is available in the repo.
|
|
||||||
|
|
||||||
#### Using
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
let
|
|
||||||
xeals = import (builtins.fetchTarball "https://git.xeal.me/xeals/nur-packages/archive/master.tar.gz") {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
# e.g., for IntelliJ IDEA
|
|
||||||
xeal.jetbrains.ideaCommunityWithPlugins (jpkgs: [
|
|
||||||
jpkgs.ideavim
|
|
||||||
jpgs.checkstyle-idea
|
|
||||||
]})
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Issues
|
|
||||||
|
|
||||||
- [ ] The plugin derivation overrides the base instead of extending it; this is really only an issue for the open-source IDEs, and only once they're actually built from source (instead of repackaging the JARs)
|
|
||||||
- [ ] Plugins must be manually added to the repo; long-term, I'd really want some way to scrape them, or at least have a script to add and update
|
|
||||||
|
|
||||||
### spotify-ripper
|
|
||||||
|
|
||||||
`spotify-ripper` is pretty flexible in the formats it supports, so the derivation allows you to customize which support packages to build with.
|
|
||||||
|
|
||||||
The default package comes with nothing (which is not entirely useful -- this will probably change at some point). See [the builder](./pkgs/tools/misc/spotify-ripper/default.nix) for options.
|
|
||||||
|
|
||||||
## General issues
|
|
||||||
|
|
||||||
- [ ] `spotify-ripper` does not build on stable NixOS channels before 20.09 when built with m4a or mp4 support, as `fdk-aac-encoder` is not available
|
|
||||||
- [ ] Due to weirdness in fixed output hashes, anything using `buildGoModule` and `buildRustPackage` will fail on unstable channels of Nixpkgs, and must be overridden if you want to use these packages on unstable channels
|
|
||||||
|
94
default.nix
94
default.nix
@ -15,34 +15,15 @@ rec {
|
|||||||
overlays = import ./overlays; # nixpkgs overlays
|
overlays = import ./overlays; # nixpkgs overlays
|
||||||
|
|
||||||
# Alacritty with the unmerged ligature patches applied.
|
# Alacritty with the unmerged ligature patches applied.
|
||||||
alacritty-ligatures = (pkgs.alacritty.override {
|
alacritty-ligatures = pkgs.callPackage ./pkgs/applications/misc/alacritty/ligatures.nix {
|
||||||
# Requires a minimum of 1.41, and this is the only version on both stable
|
|
||||||
# and unstable channels right now.
|
|
||||||
inherit (pkgs.rustPackages_1_44) rustPlatform;
|
inherit (pkgs.rustPackages_1_44) rustPlatform;
|
||||||
}).overrideAttrs (oldAttrs: rec {
|
inherit (pkgs.xorg) libXcursor libXxf86vm libXi;
|
||||||
pname = "${oldAttrs.pname}-ligatures";
|
inherit (pkgs.darwin.appls_sdk.frameworks) AppKit CoreGraphics CoreServices CoreText Foundation OpenGL;
|
||||||
version = "0.6.0.20201015";
|
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "zenixls2";
|
|
||||||
repo = "alacritty";
|
|
||||||
fetchSubmodules = true;
|
|
||||||
rev = "30ebb4303229acbfdbbf00a84a9c46973c4e0334";
|
|
||||||
sha256 = "1c0951zs1h2d6fjnxixfms3913m1c6yvgmcizgd9gfgx59ghpafi";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (pkgs.lib.const {
|
|
||||||
name = "${pname}-${version}-vendor";
|
|
||||||
inherit src;
|
|
||||||
outputHash = "1zvj8hdlc3fii1ffwkigvxjigwx53vls543pgcv3a2bw4sn1ky1k";
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
amdgpu-fan = pkgs.callPackage ./pkgs/tools/misc/amdgpu-fan { };
|
amdgpu-fan = pkgs.callPackage ./pkgs/tools/misc/amdgpu-fan { };
|
||||||
|
|
||||||
goModules = pkgs.recurseIntoAttrs rec {
|
go-qt = pkgs.libsForQt512.callPackage ./pkgs/development/go-modules/qt { };
|
||||||
qt = pkgs.libsForQt512.callPackage ./pkgs/development/go-modules/qt { };
|
|
||||||
};
|
|
||||||
|
|
||||||
# A functional Jetbrains IDE-with-plugins package set.
|
# A functional Jetbrains IDE-with-plugins package set.
|
||||||
jetbrains =
|
jetbrains =
|
||||||
@ -55,10 +36,10 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
builder = import ./pkgs/applications/editors/jetbrains/builder.nix {
|
builder = import ./pkgs/applications/editors/jetbrains/builder.nix {
|
||||||
inherit (pkgs) lib;
|
inherit lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
jbScope = pkgs.lib.makeScope pkgs.newScope (self: pkgs.lib.makeOverridable
|
jbScope = pkgs.lib.makeScope pkgs.newScope (self: lib.makeOverridable
|
||||||
({ jetbrainsPlugins ? mkJetbrainsPlugins
|
({ jetbrainsPlugins ? mkJetbrainsPlugins
|
||||||
, ideaPlugins ? mkIdeaPlugins
|
, ideaPlugins ? mkIdeaPlugins
|
||||||
}: ({ }
|
}: ({ }
|
||||||
@ -71,16 +52,16 @@ rec {
|
|||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
inherit (jbScope) jetbrainsWithPlugins;
|
inherit (jbScope) jetbrainsWithPlugins;
|
||||||
clionWithPlugins = jetbrainsWithPlugins pkgs.jetbrains.clion;
|
clionWithPlugins = jetbrainsWithPlugins jetbrains.clion;
|
||||||
ideaCommunityWithPlugins = jetbrainsWithPlugins pkgs.jetbrains.idea-community;
|
ideaCommunityWithPlugins = jetbrainsWithPlugins jetbrains.idea-community;
|
||||||
ideaUltimateWithPlugins = jetbrainsWithPlugins pkgs.jetbrains.idea-ultimate;
|
ideaUltimateWithPlugins = jetbrainsWithPlugins jetbrains.idea-ultimate;
|
||||||
plugins = jbScope;
|
plugins = jbScope;
|
||||||
};
|
};
|
||||||
|
|
||||||
libhl = pkgs.callPackage ./pkgs/development/libraries/libhl { };
|
libhl = pkgs.callPackage ./pkgs/development/libraries/libhl { };
|
||||||
|
|
||||||
mopidy-subidy = pkgs.callPackage ./pkgs/applications/audio/mopidy/subidy.nix {
|
mopidy-subidy = pkgs.callPackage ./pkgs/applications/audio/mopidy/subidy.nix {
|
||||||
python3Packages = pkgs.python3Packages // python3Packages;
|
inherit (python3Packages) py-sonic;
|
||||||
};
|
};
|
||||||
|
|
||||||
pam_gnupg = pkgs.callPackage ./pkgs/os-specific/linux/pam_gnupg { };
|
pam_gnupg = pkgs.callPackage ./pkgs/os-specific/linux/pam_gnupg { };
|
||||||
@ -101,50 +82,6 @@ rec {
|
|||||||
patches = (oldAttrs.patches or [ ]) ++ [ ./pkgs/applications/misc/polybar/9button.patch ];
|
patches = (oldAttrs.patches or [ ]) ++ [ ./pkgs/applications/misc/polybar/9button.patch ];
|
||||||
});
|
});
|
||||||
|
|
||||||
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 {
|
python3Packages = pkgs.recurseIntoAttrs {
|
||||||
py-sonic = pkgs.python3.pkgs.callPackage ./pkgs/development/python-modules/py-sonic { };
|
py-sonic = pkgs.python3.pkgs.callPackage ./pkgs/development/python-modules/py-sonic { };
|
||||||
};
|
};
|
||||||
@ -152,20 +89,19 @@ rec {
|
|||||||
# The one in Nixpkgs still extracts the pre-built Debian package instead
|
# The one in Nixpkgs still extracts the pre-built Debian package instead
|
||||||
# of building from source.
|
# of building from source.
|
||||||
protonmailBridgePackages = pkgs.libsForQt512.callPackage ./pkgs/applications/networking/protonmail-bridge {
|
protonmailBridgePackages = pkgs.libsForQt512.callPackage ./pkgs/applications/networking/protonmail-bridge {
|
||||||
inherit goModules;
|
inherit go-qt;
|
||||||
};
|
};
|
||||||
protonmail-bridge = protonmailBridgePackages.protonmail-bridge;
|
inherit (protonmailBridgePackages)
|
||||||
protonmail-bridge-headless = protonmailBridgePackages.protonmail-bridge-headless;
|
protonmail-bridge
|
||||||
|
protonmail-bridge-headless;
|
||||||
|
|
||||||
radeon-profile-daemon = pkgs.libsForQt5.callPackage ./pkgs/tools/misc/radeon-profile-daemon { };
|
radeon-profile-daemon = pkgs.libsForQt5.callPackage ./pkgs/tools/misc/radeon-profile-daemon { };
|
||||||
|
|
||||||
samrewritten = pkgs.callPackage ./pkgs/tools/misc/samrewritten { };
|
samrewritten = pkgs.callPackage ./pkgs/tools/misc/samrewritten { };
|
||||||
|
|
||||||
spotify-ripper = pkgs.callPackage ./pkgs/tools/misc/spotify-ripper {
|
spotify-ripper = pkgs.callPackage ./pkgs/tools/misc/spotify-ripper {
|
||||||
# NOTE: Not available in 20.03. Specifying it this way lets me cheat the
|
# NOTE: Not available in 20.03.
|
||||||
# build auto-failing on 20.03 because of the attribute not existing.
|
|
||||||
inherit (pkgs) fdk-aac-encoder;
|
inherit (pkgs) fdk-aac-encoder;
|
||||||
python2Packages = pkgs.python2Packages // python2Packages.overlay;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
zsh-z = pkgs.callPackage ./pkgs/shells/zsh/zsh-z { };
|
zsh-z = pkgs.callPackage ./pkgs/shells/zsh/zsh-z { };
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
amdgpu-common = ./services/hardware/amdgpu-common.nix;
|
# Add your NixOS modules here
|
||||||
amdgpu-fan = ./services/hardware/amdgpu-fan.nix;
|
#
|
||||||
amdgpu-pwm = ./services/hardware/amdgpu-pwm.nix;
|
# my-module = ./my-module;
|
||||||
radeon-profile-daemon = ./services/hardware/radeon-profile-daemon.nix;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
|
||||||
options.services.amdgpu = {
|
|
||||||
cards = mkOption {
|
|
||||||
type = types.listOf types.str;
|
|
||||||
default = [ "card0" ];
|
|
||||||
example = literalExample ''[ "card0" ]'';
|
|
||||||
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.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,71 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
acfg = config.services.amdgpu;
|
|
||||||
cfg = config.services.amdgpu.fan;
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
|
||||||
options.services.amdgpu.fan = {
|
|
||||||
enable = mkEnableOption "amdgpu-fan";
|
|
||||||
|
|
||||||
speedMatrix = mkOption {
|
|
||||||
type = with types; listOf (listOf int);
|
|
||||||
# Translated from upstream default config. Since it tries to write the
|
|
||||||
# config if it's not found, we want some kind of default.
|
|
||||||
default = [
|
|
||||||
[ 0 0 ]
|
|
||||||
[ 30 33 ]
|
|
||||||
[ 45 50 ]
|
|
||||||
[ 60 66 ]
|
|
||||||
[ 65 69 ]
|
|
||||||
[ 70 75 ]
|
|
||||||
[ 75 89 ]
|
|
||||||
[ 80 100 ]
|
|
||||||
];
|
|
||||||
example = literalExample ''
|
|
||||||
[
|
|
||||||
[ 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 %.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
assertions = singleton {
|
|
||||||
assertion = all (speeds: length speeds == 2) cfg.speedMatrix;
|
|
||||||
message = "services.amdgpu-fan.speedMatrix must be a list of paired lists";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.etc."amdgpu-fan.yml".text = builtins.toJSON {
|
|
||||||
speed_matrix = cfg.speedMatrix;
|
|
||||||
cards = acfg.cards;
|
|
||||||
};
|
|
||||||
|
|
||||||
powerManagement.resumeCommands = "${pkgs.systemd}/bin/systemctl try-restart amdgpu-fan";
|
|
||||||
|
|
||||||
# Translated from the upstream service file.
|
|
||||||
systemd.services = {
|
|
||||||
amdgpu-fan = {
|
|
||||||
description = "amdgpu fan controller";
|
|
||||||
wantedBy = [ "default.target" ];
|
|
||||||
after = [ "enable-manual-amdgpu-fan.service" ];
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${pkgs.amdgpu-fan}/bin/amdgpu-fan";
|
|
||||||
Restart = "always";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
acfg = config.services.amdgpu;
|
|
||||||
cfg = config.services.amdgpu.pwm;
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
|
||||||
options.services.amdgpu.pwm = {
|
|
||||||
enable = mkEnableOption "amdgpu-pwm";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
systemd.services.amdgpu-pwm = {
|
|
||||||
description = "enable manual configuration of AMDGPU fans";
|
|
||||||
wantedBy = [ "default.target" ];
|
|
||||||
script =
|
|
||||||
let
|
|
||||||
enablePwm = card: "echo 1 > /sys/class/drm/${card}/device/hwmon/hwmon1/pwm1_enable";
|
|
||||||
in
|
|
||||||
lib.concatStringsSep "\n" (map enablePwm acfg.cards);
|
|
||||||
serviceConfig.Type = "oneshot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
cfg = config.services.radeon-profile-daemon;
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
|
||||||
options.services.radeon-profile-daemon = {
|
|
||||||
enable = mkEnableOption "radeon-profile-daemon";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
systemd.services = {
|
|
||||||
radeon-profile-daemon = {
|
|
||||||
description = "radeon-profile daemon";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
after = [ "enable-manual-amdgpu-fan.service" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "${pkgs.radeon-profile-daemon}/bin/radeon-profile-daemon";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
16
overlay.nix
16
overlay.nix
@ -10,19 +10,9 @@ let
|
|||||||
nameValuePair = n: v: { name = n; value = v; };
|
nameValuePair = n: v: { name = n; value = v; };
|
||||||
nurAttrs = import ./default.nix { pkgs = super; };
|
nurAttrs = import ./default.nix { pkgs = super; };
|
||||||
|
|
||||||
overlay =
|
in
|
||||||
|
|
||||||
builtins.listToAttrs
|
builtins.listToAttrs
|
||||||
(map (n: nameValuePair n nurAttrs.${n})
|
(map (n: nameValuePair n nurAttrs.${n})
|
||||||
(builtins.filter (n: !isReserved n)
|
(builtins.filter (n: !isReserved n)
|
||||||
(builtins.attrNames nurAttrs)));
|
(builtins.attrNames nurAttrs)))
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
# Shadow existing package sets if they already exist rather than replacing.
|
|
||||||
overlay //
|
|
||||||
{
|
|
||||||
goModules = (super.goModules or { }) // (overlay.goModules or { });
|
|
||||||
jetbrains = (super.jetbrains or { }) // (overlay.jetbrains or { });
|
|
||||||
python2Packages = (super.python2Packages or { }) // (overlay.python2Packages or { });
|
|
||||||
python3Packages = (super.python3Packages or { }) // (overlay.python3Packages or { });
|
|
||||||
}
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
, python3Packages
|
, python3Packages
|
||||||
|
|
||||||
, mopidy
|
, mopidy
|
||||||
|
, py-sonic
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
@ -16,7 +17,7 @@ python3Packages.buildPythonApplication rec {
|
|||||||
sha256 = "0c5ghhhrj5v3yp4zmll9ari6r5c6ha8c1izwqshvadn40b02q7xz";
|
sha256 = "0c5ghhhrj5v3yp4zmll9ari6r5c6ha8c1izwqshvadn40b02q7xz";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ mopidy python3Packages.py-sonic ];
|
propagatedBuildInputs = [ mopidy py-sonic ];
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
145
pkgs/applications/misc/alacritty/ligatures.nix
Normal file
145
pkgs/applications/misc/alacritty/ligatures.nix
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, rustPlatform
|
||||||
|
|
||||||
|
, cmake
|
||||||
|
, gzip
|
||||||
|
, installShellFiles
|
||||||
|
, makeWrapper
|
||||||
|
, ncurses
|
||||||
|
, pkgconfig
|
||||||
|
, python3
|
||||||
|
|
||||||
|
, expat
|
||||||
|
, fontconfig
|
||||||
|
, freetype
|
||||||
|
, libGL
|
||||||
|
, libX11
|
||||||
|
, libXcursor
|
||||||
|
, libXi
|
||||||
|
, libXrandr
|
||||||
|
, libXxf86vm
|
||||||
|
, libxcb
|
||||||
|
, libxkbcommon
|
||||||
|
, wayland
|
||||||
|
, xdg_utils
|
||||||
|
|
||||||
|
# Darwin Frameworks
|
||||||
|
, AppKit
|
||||||
|
, CoreGraphics
|
||||||
|
, CoreServices
|
||||||
|
, CoreText
|
||||||
|
, Foundation
|
||||||
|
, OpenGL
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
rpathLibs = [
|
||||||
|
expat
|
||||||
|
fontconfig
|
||||||
|
freetype
|
||||||
|
stdenv.cc.cc.lib # libstdc++.so.6
|
||||||
|
libGL
|
||||||
|
libX11
|
||||||
|
libXcursor
|
||||||
|
libXi
|
||||||
|
libXrandr
|
||||||
|
libXxf86vm
|
||||||
|
libxcb
|
||||||
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
|
libxkbcommon
|
||||||
|
wayland
|
||||||
|
];
|
||||||
|
triple =
|
||||||
|
if stdenv.isLinux
|
||||||
|
then "${stdenv.platform.kernelArch}-unknown-linux-gnu"
|
||||||
|
else "x86_64-apple-darwin";
|
||||||
|
in
|
||||||
|
|
||||||
|
# https://github.com/alacritty/alacritty/issues/4049#issuecomment-665664761
|
||||||
|
assert builtins.compareVersions rustPlatform.rust.rustc.version "1.43.0" >= 0;
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "alacritty-ligatures";
|
||||||
|
version = "0.5.0.20201015";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "zenixls2";
|
||||||
|
repo = "alacritty";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
rev = "30ebb4303229acbfdbbf00a84a9c46973c4e0334";
|
||||||
|
sha256 = "1c0951zs1h2d6fjnxixfms3913m1c6yvgmcizgd9gfgx59ghpafi";
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoSha256 = "00wlwll8gb586xgq1kq40k65x427scyswjkbhbk9szqcvkbmsr1s";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
gzip
|
||||||
|
installShellFiles
|
||||||
|
makeWrapper
|
||||||
|
ncurses
|
||||||
|
pkgconfig
|
||||||
|
python3
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = rpathLibs
|
||||||
|
++ lib.optionals stdenv.isDarwin [
|
||||||
|
AppKit
|
||||||
|
CoreGraphics
|
||||||
|
CoreServices
|
||||||
|
CoreText
|
||||||
|
Foundation
|
||||||
|
OpenGL
|
||||||
|
];
|
||||||
|
|
||||||
|
outputs = [ "out" "terminfo" ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace alacritty/src/config/mouse.rs \
|
||||||
|
--replace xdg-open ${xdg_utils}/bin/xdg-open
|
||||||
|
'';
|
||||||
|
|
||||||
|
postBuild = lib.optionalString stdenv.isDarwin "make app";
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
install -D target/${triple}/release/alacritty $out/bin/alacritty
|
||||||
|
|
||||||
|
'' + (
|
||||||
|
if stdenv.isDarwin then ''
|
||||||
|
mkdir $out/Applications
|
||||||
|
cp -r target/${triple}/release/osx/Alacritty.app $out/Applications/Alacritty.app
|
||||||
|
'' else ''
|
||||||
|
install -D extra/linux/Alacritty.desktop -t $out/share/applications/
|
||||||
|
install -D extra/logo/alacritty-term.svg $out/share/icons/hicolor/scalable/apps/Alacritty.svg
|
||||||
|
patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
|
||||||
|
''
|
||||||
|
) + ''
|
||||||
|
|
||||||
|
installShellCompletion --zsh extra/completions/_alacritty
|
||||||
|
installShellCompletion --bash extra/completions/alacritty.bash
|
||||||
|
installShellCompletion --fish extra/completions/alacritty.fish
|
||||||
|
|
||||||
|
install -dm 755 "$out/share/man/man1"
|
||||||
|
gzip -c extra/alacritty.man > "$out/share/man/man1/alacritty.1.gz"
|
||||||
|
|
||||||
|
install -dm 755 "$terminfo/share/terminfo/a/"
|
||||||
|
tic -xe alacritty,alacritty-direct -o "$terminfo/share/terminfo" extra/alacritty.info
|
||||||
|
mkdir -p $out/nix-support
|
||||||
|
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontPatchELF = true;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A cross-platform, GPU-accelerated terminal emulator";
|
||||||
|
homepage = "https://github.com/alacritty/alacritty";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ filalex77 mic92 cole-h ma27 ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
}
|
@ -1,44 +0,0 @@
|
|||||||
{ qtbase, go, goModules }:
|
|
||||||
|
|
||||||
{
|
|
||||||
pname = "protonmail-bridge";
|
|
||||||
|
|
||||||
tags = "pmapi_prod";
|
|
||||||
|
|
||||||
QT_PKG_CONFIG = "true";
|
|
||||||
QT_VERSION = qtbase.version;
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
goModules.qt
|
|
||||||
qtbase
|
|
||||||
];
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
cp cmd/Desktop-Bridge/main.go .
|
|
||||||
|
|
||||||
## Enable writable vendor
|
|
||||||
GOMODULE=gomodule
|
|
||||||
mv vendor $GOMODULE-vendor
|
|
||||||
mkdir vendor
|
|
||||||
readarray -t files < <(find $GOMODULE-vendor/ -type f | grep -v github.com/therecipe/qt | sed "s/$GOMODULE-//")
|
|
||||||
for f in "''${files[@]}"; do
|
|
||||||
mkdir -p $(dirname $f)
|
|
||||||
cp -s $PWD/$GOMODULE-$f $f
|
|
||||||
done
|
|
||||||
unset GOMODULE
|
|
||||||
|
|
||||||
##
|
|
||||||
mkdir -p vendor/github.com/therecipe
|
|
||||||
cp -r gomodule-vendor/github.com/therecipe/qt vendor/github.com/therecipe/qt
|
|
||||||
chmod -R a+w vendor/github.com/therecipe/qt
|
|
||||||
|
|
||||||
# Add vendor to GOPATH because fuck
|
|
||||||
mkdir -p $GOPATH
|
|
||||||
ln -s $PWD/vendor $GOPATH/src
|
|
||||||
|
|
||||||
qtsetup check
|
|
||||||
GOROOT=${go}/share/go qtdeploy "''${buildFlagsArray[@]}" build desktop
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta.broken = true;
|
|
||||||
}
|
|
@ -1,9 +1,10 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
|
, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, buildGoModule
|
, buildGoModule
|
||||||
|
|
||||||
, go
|
, go
|
||||||
, goModules
|
, go-qt
|
||||||
, libsecret
|
, libsecret
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, qtbase
|
, qtbase
|
||||||
@ -12,13 +13,12 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
builder =
|
common =
|
||||||
{ pname
|
{ pname
|
||||||
, tags
|
, tags
|
||||||
, ...
|
, ...
|
||||||
}@args:
|
}@args:
|
||||||
|
buildGoModule (lib.recursiveUpdate args rec {
|
||||||
buildGoModule (stdenv.lib.recursiveUpdate args rec {
|
|
||||||
inherit pname;
|
inherit pname;
|
||||||
version = "1.3.2";
|
version = "1.3.2";
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ let
|
|||||||
''
|
''
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "Integrate ProtonMail paid account with any program that supports IMAP and SMTP";
|
description = "Integrate ProtonMail paid account with any program that supports IMAP and SMTP";
|
||||||
homepage = "https://protonmail.com";
|
homepage = "https://protonmail.com";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
@ -58,10 +58,80 @@ let
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
protonmail-bridge = builder (import ./app.nix { inherit qtbase go goModules; });
|
protonmail-bridge = common {
|
||||||
protonmail-bridge-headless = builder (import ./headless.nix { });
|
pname = "protonmail-bridge";
|
||||||
|
|
||||||
|
tags = "pmapi_prod";
|
||||||
|
|
||||||
|
QT_PKG_CONFIG = "true";
|
||||||
|
QT_VERSION = qtbase.version;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
go-qt
|
||||||
|
qtbase
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
cp cmd/Desktop-Bridge/main.go .
|
||||||
|
|
||||||
|
## Enable writable vendor
|
||||||
|
GOMODULE=gomodule
|
||||||
|
mv vendor $GOMODULE-vendor
|
||||||
|
mkdir vendor
|
||||||
|
readarray -t files < <(find $GOMODULE-vendor/ -type f | grep -v github.com/therecipe/qt | sed "s/$GOMODULE-//")
|
||||||
|
for f in "''${files[@]}"; do
|
||||||
|
mkdir -p $(dirname $f)
|
||||||
|
cp -s $PWD/$GOMODULE-$f $f
|
||||||
|
done
|
||||||
|
unset GOMODULE
|
||||||
|
|
||||||
|
##
|
||||||
|
mkdir -p vendor/github.com/therecipe
|
||||||
|
cp -r gomodule-vendor/github.com/therecipe/qt vendor/github.com/therecipe/qt
|
||||||
|
chmod -R a+w vendor/github.com/therecipe/qt
|
||||||
|
|
||||||
|
# Add vendor to GOPATH because fuck
|
||||||
|
mkdir -p $GOPATH
|
||||||
|
ln -s $PWD/vendor $GOPATH/src
|
||||||
|
|
||||||
|
qtsetup check
|
||||||
|
GOROOT=${go}/share/go qtdeploy "''${buildFlagsArray[@]}" build desktop
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta.broken = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
protonmail-bridge-headless = common rec {
|
||||||
|
pname = "protonmail-bridge-headless";
|
||||||
|
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Fix up name.
|
||||||
|
postInstall = ''
|
||||||
|
mv $out/bin/Desktop-Bridge $out/bin/protonmail-bridge
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta.broken = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
{}:
|
|
||||||
|
|
||||||
rec {
|
|
||||||
pname = "protonmail-bridge-headless";
|
|
||||||
|
|
||||||
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
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Fix up name.
|
|
||||||
postInstall = ''
|
|
||||||
mv $out/bin/Desktop-Bridge $out/bin/protonmail-bridge
|
|
||||||
'';
|
|
||||||
}
|
|
@ -31,8 +31,8 @@ buildGoModule rec {
|
|||||||
github.com/therecipe/env_linux_amd64_513 v0.0.0-20190626000307-e137a3934da6
|
github.com/therecipe/env_linux_amd64_513 v0.0.0-20190626000307-e137a3934da6
|
||||||
github.com/therecipe/env_windows_amd64_513 v0.0.0-20190626000028-79ec8bd06fb2
|
github.com/therecipe/env_windows_amd64_513 v0.0.0-20190626000028-79ec8bd06fb2
|
||||||
github.com/therecipe/env_windows_amd64_513/Tools v0.0.0-20190626000028-79ec8bd06fb2
|
github.com/therecipe/env_windows_amd64_513/Tools v0.0.0-20190626000028-79ec8bd06fb2
|
||||||
github.com/therecipe/qt/internal/binding/files/docs/5.12.0 v0.0.0-20200904063919-c0c124a5770d
|
github.com/therecipe/qt/internal/binding/files/docs/5.12.0 v0.0.0-20200701200531-7f61353ee73e
|
||||||
github.com/therecipe/qt/internal/binding/files/docs/5.13.0 v0.0.0-20200904063919-c0c124a5770d
|
github.com/therecipe/qt/internal/binding/files/docs/5.13.0 v0.0.0-20200701200531-7f61353ee73e
|
||||||
)
|
)
|
||||||
EOM
|
EOM
|
||||||
'';
|
'';
|
||||||
|
@ -18,6 +18,44 @@ assert m4aSupport || mp4Support -> fdk-aac-encoder.meta.available;
|
|||||||
assert oggSupport -> vorbisTools.meta.available;
|
assert oggSupport -> vorbisTools.meta.available;
|
||||||
assert opusSupport -> opusTools.meta.available;
|
assert opusSupport -> opusTools.meta.available;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
lockPackage =
|
||||||
|
{ package
|
||||||
|
, version
|
||||||
|
, sha256
|
||||||
|
, extra ? (oldAttrs: { })
|
||||||
|
}: package.overrideAttrs (oldAttrs: rec {
|
||||||
|
inherit version;
|
||||||
|
src = python2Packages.fetchPypi {
|
||||||
|
inherit (oldAttrs) pname;
|
||||||
|
inherit version sha256;
|
||||||
|
};
|
||||||
|
} // extra oldAttrs);
|
||||||
|
|
||||||
|
colorama = lockPackage {
|
||||||
|
package = python2Packages.colorama;
|
||||||
|
version = "0.3.3";
|
||||||
|
sha256 = "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb";
|
||||||
|
};
|
||||||
|
|
||||||
|
mutagen = lockPackage {
|
||||||
|
package = python2Packages.mutagen;
|
||||||
|
version = "1.30";
|
||||||
|
sha256 = "0kv2gjnzbj1w0bswmxm7wi05x6ypi7jk52s0lb8gw8s459j41gyd";
|
||||||
|
extra = oldAttrs: {
|
||||||
|
patches = [ ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
pyspotify = lockPackage {
|
||||||
|
package = python2Packages.pyspotify;
|
||||||
|
version = "2.0.5";
|
||||||
|
sha256 = "0y16c024rrvbvfdqj1n0k4b25b1nbza3i7kspg5b0ci2src1rm7v";
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
python2Packages.buildPythonApplication rec {
|
python2Packages.buildPythonApplication rec {
|
||||||
pname = "spotify-ripper";
|
pname = "spotify-ripper";
|
||||||
version = "2016.12.31";
|
version = "2016.12.31";
|
||||||
@ -29,14 +67,14 @@ python2Packages.buildPythonApplication rec {
|
|||||||
sha256 = "003d6br20f1cf4qvmpl62bk0k4h4v66ib76wn36c23bnh9x5q806";
|
sha256 = "003d6br20f1cf4qvmpl62bk0k4h4v66ib76wn36c23bnh9x5q806";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = (with python2Packages; [
|
propagatedBuildInputs = [
|
||||||
colorama
|
colorama
|
||||||
mutagen
|
mutagen
|
||||||
pyspotify
|
pyspotify
|
||||||
requests
|
python2Packages.requests
|
||||||
schedule
|
python2Packages.schedule
|
||||||
setuptools
|
python2Packages.setuptools
|
||||||
]) ++ [
|
|
||||||
(if flacSupport then flac else null)
|
(if flacSupport then flac else null)
|
||||||
(if alacSupport then libav else null)
|
(if alacSupport then libav else null)
|
||||||
(if aacSupport then faac else null)
|
(if aacSupport then faac else null)
|
||||||
|
Loading…
Reference in New Issue
Block a user