This commit is contained in:
Jeffrey C. Ollie 2022-11-15 20:06:44 -06:00
commit e42abffa6b
No known key found for this signature in database
GPG key ID: F936E4DCB7E25F15
2 changed files with 111 additions and 0 deletions

42
flake.lock Normal file
View file

@ -0,0 +1,42 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1668417584,
"narHash": "sha256-yeuEyxKPwsm5fIHN49L/syn9g5coxnPp3GsVquhrv5A=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "013fcdd106823416918004bb684c3c186d3c460f",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

69
flake.nix Normal file
View file

@ -0,0 +1,69 @@
{
description = "openlens";
inputs = {
nixpkgs = {
url = "nixpkgs/nixos-unstable";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
};
in
{
packages = {
open-lens =
let
pname = "open-lens";
version = "6.1.19";
name = "${pname}-${version}";
src = builtins.fetchurl {
url = "https://github.com/MuhammedKalkan/OpenLens/releases/download/v${version}/OpenLens-${version}.AppImage";
sha256 = "sha256:0jf67awkz4vaz2f4gxvwsbz06kf9gn3zbr6dz96lw6qnzqjp4f0a";
name = "${pname}.AppImage";
};
appimageContents = pkgs.appimageTools.extractType2 {
inherit name src;
};
in
pkgs.appimageTools.wrapType2 {
inherit name src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/open-lens.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/open-lens.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Icon=open-lens' 'Icon=${pname}' \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
meta = {
homepage = "";
description = "";
longDescription =
''
'';
};
};
apps = {
# asdm = {
# type = "app";
# program = "${self.packages.${system}.mpc}/bin/mpc";
# };
};
};
}
);
}