Converge packages
This commit is contained in:
parent
6fdfda1353
commit
4487d7f268
22
flake.lock
22
flake.lock
|
@ -111,6 +111,21 @@
|
|||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1667077288,
|
||||
"narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
|
@ -125,7 +140,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"flake-utils_4": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
|
@ -222,7 +237,7 @@
|
|||
},
|
||||
"idris2": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"idris-emacs-src": "idris-emacs-src",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
|
@ -489,6 +504,7 @@
|
|||
"darwin": "darwin",
|
||||
"emacs": "emacs",
|
||||
"fenix": "fenix",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"gamescope": "gamescope",
|
||||
"home-manager": "home-manager",
|
||||
"idris2": "idris2",
|
||||
|
@ -606,7 +622,7 @@
|
|||
"wsl": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
|
|
34
flake.nix
34
flake.nix
|
@ -16,6 +16,7 @@
|
|||
home-manager.follows = "home-manager";
|
||||
};
|
||||
};
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
darwin = {
|
||||
url = "github:lnl7/nix-darwin/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -65,9 +66,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, fenix, emacs
|
||||
, sops-nix, home-manager, darwin, prismlauncher, java, quilt-server
|
||||
, nixos-generators, wsl, gamescope, nix-on-droid, idris2 }@inputs:
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, nixos-hardware
|
||||
, fenix, emacs, sops-nix, home-manager, darwin, prismlauncher, java
|
||||
, quilt-server, nixos-generators, wsl, gamescope, nix-on-droid, idris2
|
||||
}@inputs:
|
||||
let
|
||||
makeNixosSystem =
|
||||
{ system, hostName, extraModules ? [ ], ourNixpkgs ? nixpkgs }:
|
||||
|
@ -211,5 +213,31 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
} // flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
# Special handling for discord, as it's unfree _and_ insecure!
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [ "electron-13.6.9" ];
|
||||
};
|
||||
};
|
||||
in {
|
||||
packages = flake-utils.lib.flattenTree {
|
||||
discordWayland = pkgs.callPackage ./packages/discord/default.nix rec {
|
||||
pname = "discord-electron";
|
||||
binaryName = "Discord";
|
||||
desktopName = "Discord (Wayland)";
|
||||
version = "0.0.21";
|
||||
src = pkgs.fetchurl {
|
||||
url =
|
||||
"https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
|
||||
hash = "sha256-KDKUssPRrs/D10s5GhJ23hctatQmyqd27xS9nU7iNaM=";
|
||||
};
|
||||
electron = pkgs.electron_13;
|
||||
};
|
||||
swayimg = pkgs.callPackage ./packages/swayimg/default.nix { };
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -18,19 +18,6 @@
|
|||
--add-flags "--ozone-platform=wayland"
|
||||
'';
|
||||
});
|
||||
discordWayland =
|
||||
pkgs.callPackage ../../../packages/discord/default.nix rec {
|
||||
pname = "discord-electron";
|
||||
binaryName = "Discord";
|
||||
desktopName = "Discord (Wayland)";
|
||||
version = "0.0.21";
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
|
||||
hash = "sha256-KDKUssPRrs/D10s5GhJ23hctatQmyqd27xS9nU7iNaM=";
|
||||
};
|
||||
electron = pkgs.electron_13;
|
||||
};
|
||||
zulipWayland = pkgs.makeDesktopItem {
|
||||
name = "zulip-wayland";
|
||||
desktopName = "Zulip (Wayland)";
|
||||
|
@ -66,7 +53,7 @@
|
|||
};
|
||||
in [
|
||||
# Discord
|
||||
discordWayland
|
||||
inputs.self.packages.${pkgs.system}.discordWayland
|
||||
betterdiscordctl
|
||||
# Desktop matrix client
|
||||
(enableWayland element-desktop "element-desktop")
|
||||
|
|
|
@ -4,7 +4,6 @@ in with lib; {
|
|||
config = mkIf nathan.programs.swaywm.enable (let
|
||||
swaylock-command = ''
|
||||
${pkgs.swaylock-effects}/bin/swaylock --screenshots --grace 30 --indicator --clock --timestr "%-I:%M:%S %p" --datestr "%A %Y-%M-%d" --effect-blur 20x3'';
|
||||
swayimg = pkgs.callPackage ../../../packages/swayimg/default.nix { };
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
# Locking and display management
|
||||
|
@ -34,7 +33,7 @@ in with lib; {
|
|||
# fuzzel for launcher
|
||||
fuzzel
|
||||
# for image viewing
|
||||
swayimg
|
||||
inputs.self.packages.${pkgs.system}.swayimg
|
||||
];
|
||||
#########################
|
||||
## Sway
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron_17 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "blockbench-electron";
|
||||
version = "4.2.5";
|
||||
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://github.com/JannisX11/blockbench/releases/download/v${version}/Blockbench_${version}.AppImage";
|
||||
sha256 = "ibgWP3i0QGKnL0ZmDusouo2DoDxOkRZQFqIl8SEChbs=";
|
||||
name = "${pname}-${version}.AppImage";
|
||||
};
|
||||
|
||||
appimageContents = appimageTools.extractType2 {
|
||||
name = "${pname}-${version}";
|
||||
inherit src;
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin $out/share/${pname} $out/share/applications
|
||||
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
|
||||
cp -a ${appimageContents}/blockbench.desktop $out/share/applications/${pname}.desktop
|
||||
cp -a ${appimageContents}/usr/share/icons $out/share
|
||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||
--replace 'Exec=AppRun' 'Exec=${pname}'
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
makeWrapper ${electron_17}/bin/electron $out/bin/${pname} \
|
||||
--add-flags $out/share/${pname}/resources/app.asar \
|
||||
--add-flags "--enable-features=UseOzonePlatform" \
|
||||
--add-flags "--ozone-platform=wayland" \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A boxy 3D model editor powered by Electron";
|
||||
homepage = "https://blockbench.net/";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = [ maintainers.ckie ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue