Compare commits

..

8 Commits

Author SHA1 Message Date
906c5ee15c
protonmail-bridge: 1.5.2 -> 1.5.4 2021-01-04 13:13:18 +11:00
c0fb93b48b
samrewritten: 2.0 -> 2.1 2021-01-04 12:23:50 +11:00
b46e60ddec
samrewritten: add missing platforms 2021-01-04 12:14:05 +11:00
738de5e474
zsh-z: add missing platforms 2021-01-04 12:10:34 +11:00
5008a658a7
libhl: add missing platforms 2021-01-04 12:10:27 +11:00
0a29cfdf1e
core: add apps 2021-01-04 12:05:15 +11:00
95e5685f53
psst: init at 20210103.002c2bb 2021-01-04 12:05:15 +11:00
a15ba6ca0a
core: remove envrc 2021-01-04 10:49:36 +11:00
9 changed files with 120 additions and 40 deletions

1
.envrc
View File

@ -1 +0,0 @@
eval "$(lorri direnv)"

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
result result
result-* result-*
.direnv
.envrc

View File

@ -8,27 +8,40 @@
outputs = { self, nixpkgs, flake-utils }: outputs = { self, nixpkgs, flake-utils }:
let let
inherit (flake-utils.lib) defaultSystems flattenTree; inherit (flake-utils.lib) eachDefaultSystem flattenTree;
inherit (nixpkgs.lib.attrsets) filterAttrs genAttrs mapAttrs; inherit (nixpkgs.lib.attrsets) filterAttrs mapAttrs;
in in
{ {
nixosModules = mapAttrs (_: path: import path) (import ./modules); nixosModules = mapAttrs (_: path: import path) (import ./modules);
overlay = final: prev: {
xeals = nixpkgs.lib.composeExtensions self.overlays.pkgs;
};
overlays = import ./overlays // { overlays = import ./overlays // {
pkgs = final: prev: import ./pkgs/top-level/all-packages.nix { pkgs = prev; }; pkgs = final: prev: import ./pkgs/top-level/all-packages.nix { pkgs = prev; };
}; };
packages = genAttrs defaultSystems
(system: overlay = final: prev: {
xeals = nixpkgs.lib.composeExtensions self.overlays.pkgs;
};
} // eachDefaultSystem (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
xPkgs = import ./pkgs/top-level/all-packages.nix { inherit pkgs; }; xPkgs = import ./pkgs/top-level/all-packages.nix { inherit pkgs; };
mkApp = opts: { type = "app"; } // opts;
in in
filterAttrs rec {
(attr: drv: packages = filterAttrs
builtins.elem system drv.meta.platforms or [ ]) (attr: drv: builtins.elem system (drv.meta.platforms or [ ]))
xPkgs (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"; };
};
});
} }

View File

@ -0,0 +1,71 @@
{ stdenv
, fetchFromGitHub
, rustPlatform
, cmake
, pkg-config
, openssl
# GUI
, withGui ? true
, copyDesktopItems
, makeDesktopItem
, gtk3
}:
let
inherit (stdenv.lib) optional optionals;
in
assert withGui -> gtk3.meta.available;
rustPlatform.buildRustPackage rec {
pname = "psst";
version = "20210103.002c2bb";
src = fetchFromGitHub {
owner = "jpochyla";
repo = "psst";
rev = "002c2bbd610ab7a49b095cd871c56bfe2c3a9f6b";
sha256 = "883ecb0ae2ef5af441dc4fe15ef15a2077f2cef10ab3e96096c38355acdba031";
fetchSubmodules = true;
};
cargoSha256 = "e3f94e41fda9e2bc55b48ee77487d574d35e771fbd13a565432f30cda26654a1";
nativeBuildInputs = [ pkg-config ]
++ optional withGui copyDesktopItems;
buildInputs = [ openssl ]
++ optional withGui gtk3;
cargoBuildFlags = optionals (!withGui) [
"--workspace"
"--exclude"
"psst-gui"
];
# Unable to exclude targets from the check phase as it doesn't respect
# `cargoBuildFlags`; to save from attempting to build the GUI without meaning
# to, don't bother checking for CLI-only builds.
# https://github.com/NixOS/nixpkgs/blob/77d190f10931c1d06d87bf6d772bf65346c71777/pkgs/build-support/rust/default.nix#L241
doCheck = withGui;
desktopItems = optionals withGui [
(makeDesktopItem {
name = pname;
desktopName = "psst";
genericName = "Spotify Player";
categories = "AudioVideo;Audio;Network;Player;";
comment = "Spotify client with native GUI";
exec = "psst-gui";
extraEntries = "Keywords=spotify;music;";
icon = "spotify";
type = "Application";
})
];
meta = with stdenv.lib; {
description = "Fast and multi-platform Spotify client with native GUI ";
homepage = "https://github.com/jpochyla/psst";
license = licenses.mit;
};
}

View File

@ -20,16 +20,16 @@ let
buildGoModule (stdenv.lib.recursiveUpdate args rec { buildGoModule (stdenv.lib.recursiveUpdate args rec {
inherit pname; inherit pname;
version = "1.5.2"; version = "1.5.4";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ProtonMail"; owner = "ProtonMail";
repo = "proton-bridge"; repo = "proton-bridge";
rev = "br-${version}"; rev = "br-${version}";
sha256 = "1mv7fwapcarii43nnsgk7ifqlah07k54zk6vxxxmrp04gy0mzki6"; sha256 = "1398d13skn6as9carxiws500rp5j9b33r0j2blpxrff856a8v0bp";
}; };
vendorSha256 = "01d6by8xj9py72lpfns08zqnsym98v8imb7d6hgmnzp4hfqzbz3c"; vendorSha256 = "1a83kh096pkyklqgdip112fps6ia90vg7zxv0nvivxmdyik2vcvz";
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [
pkg-config pkg-config

View File

@ -26,9 +26,10 @@ stdenv.mkDerivation rec {
mkdir -p $out/include $out/lib mkdir -p $out/include $out/lib
''; '';
meta = { meta = with stdenv.lib; {
homepage = "https://github.com/xant/libhl"; 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 "; description = "Simple and fast C library implementing a thread-safe API to manage hash-tables, linked lists, lock-free ring buffers and queues ";
license = stdenv.lib.licenses.lgpl3; license = licenses.lgpl3;
platforms = platforms.all;
}; };
} }

View File

@ -30,5 +30,6 @@ stdenv.mkDerivation {
description = ''Jump quickly to directories that you have visited "frecently." A native ZSH port of z.sh.''; description = ''Jump quickly to directories that you have visited "frecently." A native ZSH port of z.sh.'';
homepage = "https://github.com/agkozak/zsh-z"; homepage = "https://github.com/agkozak/zsh-z";
license = stdenv.lib.licenses.mit; license = stdenv.lib.licenses.mit;
platforms = zsh.meta.platforms;
}; };
} }

View File

@ -13,13 +13,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "SamRewritten"; pname = "SamRewritten";
version = "2.0"; version = "2.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "PaulCombal"; owner = "PaulCombal";
repo = pname; repo = pname;
rev = "202005"; rev = "202008";
sha256 = "0zcb6cmzk4fvbf0rkyyfvlnh9mhi0wz89parprkz6vxrj65ph1f6"; sha256 = "ab7903b997675b0d4d7eede15430fc5ca2736e6c25c7f95a7c97e1ce25582a1c";
}; };
nativeBuildInputs = [ gnumake pkg-config ]; nativeBuildInputs = [ gnumake pkg-config ];
@ -33,21 +33,10 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_LINK = "-pthread"; NIX_CFLAGS_LINK = "-pthread";
# FIXME: Use `make install` after the next release makeFlags = [ "PREFIX=$(out)" ];
# FIXME: Get `substituteInPlace` working
installPhase = ''
mkdir -p $out/lib/SamRewritten/{bin,glade,assets}
mkdir -p $out/share/icons/hicolor/{64x64,256x256}/apps
mkdir -p $out/share/applications
mkdir -p $out/bin
cp bin/launch.sh bin/samrewritten bin/libsteam_api.so $out/lib/SamRewritten/bin/
ln -s $out/lib/SamRewritten/bin/launch.sh $out/bin/samrewritten
cp glade/main_window.glade $out/lib/SamRewritten/glade/main_window.glade
cp assets/icon_64.png $out/share/icons/hicolor/64x64/apps/samrewritten.png
cp assets/icon_256.png $out/share/icons/hicolor/256x256/apps/samrewritten.png
cp assets/icon_256.png $out/lib/SamRewritten/assets/
substitute package/samrewritten.desktop $out/share/applications/samrewritten.desktop \ postFixup = ''
substituteInPlace $out/share/applications/samrewritten.desktop \
--replace /usr/bin/samrewritten $out/bin/samrewritten --replace /usr/bin/samrewritten $out/bin/samrewritten
''; '';
@ -55,5 +44,6 @@ stdenv.mkDerivation rec {
description = "Steam Achievement Manager For Linux"; description = "Steam Achievement Manager For Linux";
homepage = "https://github.com/PaulCombal/SamRewritten"; homepage = "https://github.com/PaulCombal/SamRewritten";
license = licenses.gpl3; license = licenses.gpl3;
platforms = platforms.linux;
}; };
} }

View File

@ -91,6 +91,8 @@ rec {
patches = (oldAttrs.patches or [ ]) ++ [ ../applications/misc/polybar/9button.patch ]; patches = (oldAttrs.patches or [ ]) ++ [ ../applications/misc/polybar/9button.patch ];
}); });
psst = pkgs.callPackage ../applications/audio/psst { };
python2Packages = python2Packages =
let let
fixVersion = fixVersion =