Let's hope WSL is not against company policy

If you are looking at this, you know who you are

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-08-19 11:00:12 +00:00
parent cd4976e22d
commit af53af5630
28 changed files with 320 additions and 296 deletions

View File

@@ -0,0 +1,28 @@
{ pkgs, ... }:
# FIXME: https://github.com/nix-community/NixOS-WSL/issues/700
let
wl-copy = pkgs.writeShellScriptBin "wl-copy" ''
printf '%s' "$(cat)" | ${pkgs.dos2unix}/bin/unix2dos | clip.exe
'';
wl-paste = pkgs.writeShellScriptBin "wl-paste" ''
powershell.exe -command Get-Clipboard | ${pkgs.dos2unix}/bin/dos2unix
'';
in
pkgs.stdenv.mkDerivation {
name = "wsl-wl-clipboard";
version = "1.0";
src = ./.;
buildInputs = [
wl-copy
wl-paste
];
installPhase = ''
mkdir -p $out/bin
ln -s ${wl-copy}/bin/wl-copy $out/bin/wl-copy
ln -s ${wl-paste}/bin/wl-paste $out/bin/wl-paste
'';
}