feat: Initialized new flake
This commit is contained in:
commit
bf3cdf318b
48
flake.nix
Normal file
48
flake.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
description = "Zen Browser";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
version = "1.0.0-a.26";
|
||||
downloadUrl = "https://github.com/zen-browser/desktop/releases/download/${version}/zen.linux-specific.tar.bz2";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
|
||||
runtimeLibs = with pkgs; [
|
||||
libGL stdenv.cc.cc fontconfig libxkbcommon zlib freetype
|
||||
gtk3 libxml2 dbus xcb-util-cursor alsa-lib
|
||||
] ++ (with pkgs.xorg; [
|
||||
libxcb libX11 libXcursor libXrandr libXi
|
||||
]);
|
||||
in
|
||||
{
|
||||
packages.${system}.default = pkgs.stdenv.mkDerivation {
|
||||
name = "zen-browser";
|
||||
|
||||
src = builtins.fetchTarball {
|
||||
url = downloadUrl;
|
||||
sha256 = "sha256:1z81dg3xgfpkyj501gflx8lw7d8124iqwm27zqfja2b47zf4ai2x";
|
||||
};
|
||||
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ] ;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin && cp -r $src/* $out/bin
|
||||
'';
|
||||
|
||||
fixupPhase = ''
|
||||
chmod 755 $out/bin/*
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/zen
|
||||
wrapProgram $out/bin/zen --set LD_LIBRARY_PATH "${pkgs.lib.makeLibraryPath runtimeLibs}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue