Created
July 14, 2020 15:39
-
-
Save evanjs/b517f6e7ba39e16ec0a3f63de050558d to your computer and use it in GitHub Desktop.
winbox script/expression for nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env nix-shell | |
#! nix-shell -p wine -i sh | |
wine ~/bin/winbox.exe | |
# non nix (dependencies) version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, wine, ... }: | |
with rec { | |
version = "3.24"; | |
src = builtins.fetchurl { | |
url = "https://download.mikrotik.com/winbox/${version}/winbox64.exe"; | |
sha256 = "1sidsgms203cpvgv3rg95gz2gncgxwx5l0myard8ns5z51liygbr"; | |
}; | |
runWine = runCommand "wine-cmd" { | |
buildInputs = [ wine ]; | |
}; | |
winbox = runWine src; | |
}; | |
import winbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nix-shell -E 'with import <nixpkgs> {}; with rec { version = "3.24"; src = builtins.fetchurl { url = "https://download.mikrotik.com/winbox/${version}/winbox64.exe"; sha256 = "1sidsgms203cpvgv3rg95gz2gncgxwx5l0myard8ns5z51liygbr"; }; runWine = runCommand "wine-cmd" { buildInputs = [ wine ]; }; winbox = runWine src; }; import winbox' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment