Trying to add intel-unite

This commit is contained in:
Lyes Saadi 2024-10-08 11:34:33 +02:00
parent 5f17e46132
commit 45bb7e46ba
No known key found for this signature in database
GPG key ID: 17418538BAA17767
6 changed files with 138 additions and 14 deletions

20
flake.lock generated
View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1726142087,
"narHash": "sha256-uT4TRd3PgreUD5sJaNioVfMemdyWFLoPHqN4AFszGmw=",
"lastModified": 1727383923,
"narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "da8406a6ff556b86dc368e96ca8bd81b2704a91a",
"rev": "ffe2d07e771580a005e675108212597e5b367d2d",
"type": "github"
},
"original": {
@ -38,11 +38,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1725885300,
"narHash": "sha256-5RLEnou1/GJQl+Wd+Bxaj7QY7FFQ9wjnFq1VNEaxTmc=",
"lastModified": 1727665282,
"narHash": "sha256-oKtfbQB1MBypqIyzkC8QCQcVGOa1soaXaGgcBIoh14o=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "166dee4f88a7e3ba1b7a243edb1aca822f00680e",
"rev": "11c43c830e533dad1be527ecce379fcf994fbbb5",
"type": "github"
},
"original": {
@ -54,16 +54,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1725983898,
"narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=",
"lastModified": 1727785055,
"narHash": "sha256-+BT8r1gbFaRAKkl/OFaCFDu1e0Km4UkPt6xZ7wa4B1M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43",
"rev": "d77326fb9ba777e918d8c8dfb930c1771db2c4f2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"ref": "gnome",
"repo": "nixpkgs",
"type": "github"
}

View file

@ -2,9 +2,9 @@
description = "NixOS Configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# nixpkgs.url = "github:NixOS/nixpkgs/?ref=e7f16004a749b67628898c1eda4beee6ef84f4c0";
# nixpkgs.url = "github:NixOS/nixpkgs/gnome";
nixpkgs.url = "github:NixOS/nixpkgs/gnome";
# nixpkgs.url = "github:LyesSaadi/nixpkgs/unstablegnome47";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";

View file

@ -1,4 +1,4 @@
{ ... }:
{ pkgs, ... }:
{
imports =
@ -32,7 +32,33 @@
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
options = "--delete-older-than 30d";
};
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
glib
nss
nspr
cups
dbus
expat
xorg.libxcb
libxkbcommon
cairo
pango
at-spi2-atk
libdrm
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
mesa
alsa-lib
];
};
# This value determines the NixOS release from which the default

View file

@ -117,6 +117,7 @@ in {
ocaml
ocamlPackages.ocaml-lsp
ocamlPackages.ocamlformat
opam
ledit
nodejs
nil

View file

@ -2,4 +2,5 @@
{
quadcastrgb = pkgs.callPackage ./quadcastrgb { };
ens-intel-unite = pkgs.callPackage ./ens-intel-unite { };
}

View file

@ -0,0 +1,96 @@
{
stdenv,
# fetchTarball,
buildFHSEnv,
lib,
makeDesktopItem,
copyDesktopItems,
}:
let
dist = stdenv.mkDerivation (final: {
pname = "ens-intel-unite-dist";
version = "4.2.0.38";
src = fetchTarball {
# url = "https://unite.ens-paris-saclay.fr/Intel_Unite_Linux_Manual_Install_${final.version}-amd64.tar.bz2";
url = "file:///home/lyes/Téléchargements/Intel_Unite_Linux_Manual_Install_${final.version}-amd64.tar.bz2";
sha256 = "0nm77yzdsgy882s32si4rywaqh0kjc9g14x384kar1pcrp1lb0km";
};
installPhase = ''
mkdir -p $out/opt
mv * $out/opt/
'';
dontFixup = true;
});
fhs = buildFHSEnv {
name = "ens-intel-unite-fhs";
runScript = "${dist}/opt/intel-unite-client";
targetPkgs = pkgs: (with pkgs; [
wayland
nwjs
glib
nss
nspr
cups
dbus
expat
libxkbcommon
cairo
pango
at-spi2-atk
libdrm
mesa
alsa-lib
]) ++ (with pkgs.xorg; [
libxcb
libX11
libXcomposite
libXdamage
libXext
libXfixes
libXrandr
]);
};
in
stdenv.mkDerivation {
pname = "ens-intel-unite";
inherit (dist) version;
dontUnpack = true;
nativeBuildInputs = [ copyDesktopItems ];
postInstall = ''
mkdir -p $out/bin $out/share
ln -s ${fhs}/bin/ens-intel-unite-fhs $out/bin/intel-unite
'';
desktopItems = [
(makeDesktopItem {
name = "ens-intel-unite";
exec = "${fhs}/bin/ens-intel-unite-fhs";
desktopName = "Intel Unite";
genericName = "ENS Paris-Saclay's Intel Unite";
icon = "${dist}/opt/icon128.png";
categories = [
"Network"
"VideoConference"
];
terminal = false;
startupNotify = true;
})
];
meta = with lib; {
mainProgram = "intel-unite";
description = "ENS Paris-Saclay's Intel Unite client packaged for NixOS";
homepage = "https://unite.ens-paris-saclay.fr/";
platforms = [ "x86_64-linux" ];
license = licenses.unfree;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
}