Commit a19b08f96dd3

Vincent Demeester <vincent@sbr.pm>
2025-12-05 16:54:26
refactor(pkgs): refine platform specifications and modernize packages
Update platform specifications to be more accurate and refactor vde-thinkpad to nixpkgs best practices. Changes: - Set vde-thinkpad to platforms.linux (uses X11/xmessage) - Set scripts to platforms.linux (contains Wayland/Linux tools) - Refactor vde-thinkpad: remove deprecated phases, add runHooks - Add complete metadata (license, mainProgram) to both packages Part of Phase 5 Task 1: Platform Specification Refinement 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent bdc87e3
Changed files (2)
pkgs
my
scripts
vde-thinkpad
pkgs/my/scripts/default.nix
@@ -18,8 +18,9 @@ stdenv.mkDerivation {
     runHook postInstall
   '';
 
-  meta = with lib; {
+  meta = {
     description = "Vincent's personal scripts collection";
-    platforms = platforms.unix;
+    license = lib.licenses.mit;
+    platforms = lib.platforms.linux;
   };
 }
pkgs/my/vde-thinkpad/default.nix
@@ -1,14 +1,31 @@
-{ stdenv }:
+{
+  lib,
+  stdenv,
+}:
+
+stdenv.mkDerivation {
+  pname = "vde-thinkpad";
+  version = "0.1.0";
 
-stdenv.mkDerivation rec {
-  name = "vde-thinkpad";
   src = ./.;
 
-  phases = [ "install" ];
+  dontUnpack = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
 
-  install = ''
     mkdir -p $out/bin
     cp $src/dock $out/bin
     chmod +x $out/bin/dock
+
+    runHook postInstall
   '';
+
+  meta = {
+    description = "ThinkPad dock management script";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.linux;
+    mainProgram = "dock";
+  };
 }