commit
8004e79415
@ -0,0 +1,37 @@ |
||||
with import ./parse.nix; |
||||
with import ../attrsets.nix; |
||||
|
||||
rec { |
||||
patterns = { |
||||
"32bit" = { cpu = { bits = 32; }; }; |
||||
"64bit" = { cpu = { bits = 64; }; }; |
||||
i686 = { cpu = cpuTypes.i686; }; |
||||
x86_64 = { cpu = cpuTypes.x86_64; }; |
||||
x86 = { cpu = { family = "x86"; }; }; |
||||
Arm = { cpu = { family = "arm"; }; }; |
||||
Mips = { cpu = { family = "mips"; }; }; |
||||
BigEndian = { cpu = { significantByte = significantBytes.bigEndian; }; }; |
||||
LittleEndian = { cpu = { significantByte = significantBytes.littleEndian; }; }; |
||||
|
||||
Unix = { kernel = { families = { inherit (kernelFamilies) unix; }; }; }; |
||||
BSD = { kernel = { families = { inherit (kernelFamilies) bsd; }; }; }; |
||||
|
||||
Darwin = { kernel = kernels.darwin; }; |
||||
Linux = { kernel = kernels.linux; }; |
||||
SunOS = { kernel = kernels.solaris; }; |
||||
FreeBSD = { kernel = kernels.freebsd; }; |
||||
Hurd = { kernel = kernels.hurd; }; |
||||
NetBSD = { kernel = kernels.netbsd; }; |
||||
OpenBSD = { kernel = kernels.openbsd; }; |
||||
Windows = { kernel = kernels.windows; }; |
||||
Cygwin = { kernel = kernels.windows; abi = abis.cygnus; }; |
||||
MinGW = { kernel = kernels.windows; abi = abis.gnu; }; |
||||
|
||||
Arm32 = recursiveUpdate patterns.Arm patterns."32bit"; |
||||
Arm64 = recursiveUpdate patterns.Arm patterns."64bit"; |
||||
}; |
||||
|
||||
predicates = mapAttrs' |
||||
(name: value: nameValuePair ("is" + name) (matchAttrs value)) |
||||
patterns; |
||||
} |
@ -0,0 +1,34 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
cfg = config.networking.wireless.iwd; |
||||
in { |
||||
options.networking.wireless.iwd.enable = mkEnableOption "iwd"; |
||||
|
||||
config = mkIf cfg.enable { |
||||
assertions = [{ |
||||
assertion = !config.networking.wireless.enable; |
||||
message = '' |
||||
Only one wireless daemon is allowed at the time: networking.wireless.enable and networking.wireless.iwd.enable are mutually exclusive. |
||||
''; |
||||
}]; |
||||
|
||||
# for iwctl |
||||
environment.systemPackages = [ pkgs.iwd ]; |
||||
|
||||
services.dbus.packages = [ pkgs.iwd ]; |
||||
|
||||
systemd.services.iwd = { |
||||
description = "Wireless daemon"; |
||||
before = [ "network.target" ]; |
||||
wants = [ "network.target" ]; |
||||
wantedBy = [ "multi-user.target" ]; |
||||
|
||||
serviceConfig.ExecStart = "${pkgs.iwd}/bin/iwd"; |
||||
}; |
||||
}; |
||||
|
||||
meta.maintainers = with lib.maintainers; [ mic92 ]; |
||||
} |
@ -1,65 +1 @@ |
||||
[ |
||||
{ |
||||
goPackagePath = "github.com/davecgh/go-spew"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/davecgh/go-spew"; |
||||
rev = "6d212800a42e8ab5c146b8ace3490ee17e5225f9"; |
||||
sha256 = "01i0n1s4j7khb7n6mz2wymniz37q0vbzkgfv7rbi6p9hpg227q93"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "github.com/fatih/color"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/fatih/color"; |
||||
rev = "87d4004f2ab62d0d255e0a38f1680aa534549fe3"; |
||||
sha256 = "0d51avdl4z38f7jd8qmzrzyh4gxkcjpxd0vvma9zfqhmqy15jqhb"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "github.com/mattn/go-colorable"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/mattn/go-colorable"; |
||||
rev = "ed8eb9e318d7a84ce5915b495b7d35e0cfe7b5a8"; |
||||
sha256 = "034fhyqmiqmn0v9gdbdmm0ca5d0pki2q1ch1rd34p9kh9574mjyq"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "github.com/mattn/go-isatty"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/mattn/go-isatty"; |
||||
rev = "66b8e73f3f5cda9f96b69efd03dd3d7fc4a5cdb8"; |
||||
sha256 = "17lf13ndnai9a6dlmykqkdyzf1z04q7kffs0l7kvd78wpv3l6rm5"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "github.com/online-net/c14-cli"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/online-net/c14-cli"; |
||||
rev = "e7c7c3cb214fd06df63530a4e861210e7a0a1b6c"; |
||||
sha256 = "1k53lii2c04j8cy1bnyfvckl9fglprxp75cmbg15lrp9iic2w22a"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "github.com/pmezard/go-difflib"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/pmezard/go-difflib"; |
||||
rev = "792786c7400a136282c1664665ae0a8db921c6c2"; |
||||
sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "github.com/stretchr/testify"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/stretchr/testify"; |
||||
rev = "d77da356e56a7428ad25149ca77381849a6a5232"; |
||||
sha256 = "11id286pkzyswxcx2xz6185fzh0nz6yzkk055dd6z02gvinl6pqa"; |
||||
}; |
||||
} |
||||
] |
||||
[] |
||||
|
@ -1,302 +0,0 @@ |
||||
diff --git a/_tags b/_tags
|
||||
index 88318d9..b433ee8 100644
|
||||
--- a/_tags
|
||||
+++ b/_tags
|
||||
@@ -7,9 +7,11 @@ true : package(sexplib astring)
|
||||
|
||||
<src/xconfig.ml>: package(otr ppx_sexp_conv)
|
||||
<src/utils.ml>: package(uutf)
|
||||
+<src/muc.ml>: package(uchar)
|
||||
+<src/contact.mli>: package(uchar)
|
||||
<src/persistency.ml>: package(lwt nocrypto)
|
||||
<src/xjid.{ml,mli}>: package(ppx_sexp_conv erm_xmpp)
|
||||
-<src/user.{ml,mli}>: package(ppx_sexp_conv otr hex ptime ptime.clock.os)
|
||||
+<src/user.{ml,mli}>: package(uchar ppx_sexp_conv otr hex ptime ptime.clock.os)
|
||||
<src/xmpp_callbacks.ml>: package(erm_xmpp lwt tls tls.lwt ptime)
|
||||
<src/xmpp_connection.ml>: package(erm_xmpp lwt tls tls.lwt)
|
||||
|
||||
@@ -18,6 +20,6 @@ true : package(sexplib astring)
|
||||
<cli/cli_input.ml>: package(notty lwt erm_xmpp otr)
|
||||
<cli/cli_commands.ml>: package(lwt otr erm_xmpp)
|
||||
<cli/cli_config.ml>: package(lwt nocrypto otr notty tls.lwt x509)
|
||||
-<cli/cli_state.ml>: package(hex lwt nocrypto erm_xmpp tls.lwt x509)
|
||||
+<cli/cli_state.ml>: package(uchar hex lwt nocrypto erm_xmpp tls.lwt x509)
|
||||
|
||||
<bin/jackline.{ml,byte,native}>: package(erm_xmpp hex lwt notty notty.lwt nocrypto otr sexplib tls tls.lwt ptime ptime.clock.os)
|
||||
diff --git a/cli/cli_config.ml b/cli/cli_config.ml
|
||||
index 618d655..dac6e68 100644
|
||||
--- a/cli/cli_config.ml
|
||||
+++ b/cli/cli_config.ml
|
||||
@@ -34,7 +34,7 @@ let rewrap term above below (prefix, inp, inp2) (width, _) =
|
||||
let height = if col mod width = 0 then succ h else h in
|
||||
(succ (col mod width), height)
|
||||
in
|
||||
- Notty_lwt.Term.cursor term (Some (col, row))
|
||||
+ Notty_lwt.Term.cursor term (Some (col - 1, row - 1))
|
||||
|
||||
let read_line ?(above = []) ?(prefix = "") ?default ?(below = []) term =
|
||||
let rec go (pre, post) =
|
||||
@@ -56,8 +56,8 @@ let read_line ?(above = []) ?(prefix = "") ?default ?(below = []) term =
|
||||
| `Unhandled k ->
|
||||
match k with
|
||||
| `Key (`Enter, []) -> Lwt.return (char_list_to_str (pre @ post))
|
||||
- | `Key (`Uchar 0x43, [`Ctrl]) -> Lwt.fail (Invalid_argument "Ctrl-c")
|
||||
- | `Key (`Uchar 0x44, [`Ctrl]) -> Lwt.fail (Invalid_argument "Ctrl-d")
|
||||
+ | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x43 -> Lwt.fail (Invalid_argument "Ctrl-c")
|
||||
+ | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x44 -> Lwt.fail (Invalid_argument "Ctrl-d")
|
||||
| _ -> go (pre, post)
|
||||
in
|
||||
let pre = Utils.option [] str_to_char_list default in
|
||||
@@ -180,7 +180,7 @@ let configure term () =
|
||||
let pw = "Password: " in
|
||||
let chars = match password with
|
||||
| None -> I.string A.empty "will be asked at startup"
|
||||
- | Some _ -> I.uchar A.empty 0x2605 5 1
|
||||
+ | Some _ -> I.uchar A.empty (Uchar.of_int 0x2605) 5 1
|
||||
in
|
||||
above @ [I.(string A.empty pw <|> chars)]
|
||||
in
|
||||
diff --git a/cli/cli_input.ml b/cli/cli_input.ml
|
||||
index 34b4288..07488f2 100644
|
||||
--- a/cli/cli_input.ml
|
||||
+++ b/cli/cli_input.ml
|
||||
@@ -314,19 +314,19 @@ let read_terminal term mvar input_mvar () =
|
||||
| `Key (`Arrow `Up, []) -> p (fun s -> ok (history s Up)) >>= fun () -> loop ()
|
||||
| `Key (`Arrow `Down, []) -> p (fun s -> ok (history s Down)) >>= fun () -> loop ()
|
||||
|
||||
- | `Key (`Uchar 0x44, [`Ctrl]) (* C-d *) -> p (fun s -> Lwt.return (`Quit s))
|
||||
+ | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x44 (* C-d *) -> p (fun s -> Lwt.return (`Quit s))
|
||||
|
||||
(* UI navigation and toggles *)
|
||||
| `Key (`Page `Up, []) -> p (fun s -> ok (navigate_buddy_list s Up)) >>= fun () -> loop ()
|
||||
| `Key (`Page `Down, []) -> p (fun s -> ok (navigate_buddy_list s Down)) >>= fun () -> loop ()
|
||||
|
||||
| `Key (`Page `Up, [`Ctrl]) -> p (fun s -> ok (navigate_message_buffer s Up)) >>= fun () -> loop ()
|
||||
- | `Key (`Uchar 0x50, [`Ctrl]) (* C-p *) -> p (fun s -> ok (navigate_message_buffer s Up)) >>= fun () -> loop ()
|
||||
+ | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x50 (* C-p *) -> p (fun s -> ok (navigate_message_buffer s Up)) >>= fun () -> loop ()
|
||||
| `Key (`Page `Down, [`Ctrl]) -> p (fun s -> ok (navigate_message_buffer s Down)) >>= fun () -> loop ()
|
||||
- | `Key (`Uchar 0x4E, [`Ctrl]) (* C-n *) -> p (fun s -> ok (navigate_message_buffer s Down)) >>= fun () -> loop ()
|
||||
+ | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x4E (* C-n *) -> p (fun s -> ok (navigate_message_buffer s Down)) >>= fun () -> loop ()
|
||||
|
||||
- | `Key (`Uchar 0x58, [`Ctrl]) (* C-x *) -> p (fun s -> ok (activate_contact s s.last_active_contact)) >>= fun () -> loop ()
|
||||
- | `Key (`Uchar 0x51, [`Ctrl]) (* C-q *) ->
|
||||
+ | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x58 (* C-x *) -> p (fun s -> ok (activate_contact s s.last_active_contact)) >>= fun () -> loop ()
|
||||
+ | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x51 (* C-q *) ->
|
||||
let handle s =
|
||||
let s = match List.rev s.notifications with
|
||||
| x::_ -> activate_contact s x
|
||||
diff --git a/cli/cli_state.ml b/cli/cli_state.ml
|
||||
index 5603cfe..ee320ce 100644
|
||||
--- a/cli/cli_state.ml
|
||||
+++ b/cli/cli_state.ml
|
||||
@@ -24,7 +24,7 @@ type connect_v =
|
||||
| Reconnect
|
||||
| Presence of (User.presence * string option * int option)
|
||||
|
||||
-type input = int list * int list
|
||||
+type input = Uchar.t list * Uchar.t list
|
||||
|
||||
type state = {
|
||||
(* set only initially *)
|
||||
diff --git a/cli/cli_support.ml b/cli/cli_support.ml
|
||||
index 1c54df6..8275c38 100644
|
||||
--- a/cli/cli_support.ml
|
||||
+++ b/cli/cli_support.ml
|
||||
@@ -4,17 +4,17 @@ open Notty
|
||||
module Char = struct
|
||||
let hdash a w =
|
||||
if !Utils.unicode then
|
||||
- I.uchar a 0x2500 w 1
|
||||
+ I.uchar a (Uchar.of_int 0x2500) w 1
|
||||
else
|
||||
I.char a '-' w 1
|
||||
and vdash a h =
|
||||
if !Utils.unicode then
|
||||
- I.uchar a 0x2502 1 h
|
||||
+ I.uchar a (Uchar.of_int 0x2502) 1 h
|
||||
else
|
||||
I.char a '|' 1 h
|
||||
and star a w =
|
||||
if !Utils.unicode then
|
||||
- I.uchar a 0x2605 w 1
|
||||
+ I.uchar a (Uchar.of_int 0x2605) w 1
|
||||
else
|
||||
I.char a '*' w 1
|
||||
end
|
||||
@@ -186,8 +186,8 @@ let v_center left right width =
|
||||
and rw = I.width right
|
||||
in
|
||||
match rw, lw >= width with
|
||||
- | 0, true -> (I.hcrop (lw - width + 1) 0 left, width)
|
||||
- | 0, false -> (left, succ lw)
|
||||
+ | 0, true -> (I.hcrop (lw - width + 1) 0 left, width - 1)
|
||||
+ | 0, false -> (left, lw)
|
||||
| _, _ ->
|
||||
if lw + rw >= width then
|
||||
let leftw = min (max (width - rw) (width / 2)) lw in
|
||||
@@ -195,11 +195,11 @@ let v_center left right width =
|
||||
let l = I.hcrop (lw - leftw) 0 left
|
||||
and r = I.hcrop 0 (rw - rightw) right
|
||||
in
|
||||
- (I.(l <|> r), succ leftw)
|
||||
+ (I.(l <|> r), leftw)
|
||||
else
|
||||
- (I.(left <|> right), succ lw)
|
||||
+ (I.(left <|> right), lw)
|
||||
|
||||
-let str_to_char_list str : int list =
|
||||
+let str_to_char_list str : Uchar.t list =
|
||||
let open Uutf in
|
||||
List.rev (String.fold_utf_8 (fun acc _ -> function `Uchar i -> i :: acc | `Malformed _ -> acc) [] str)
|
||||
|
||||
@@ -236,22 +236,26 @@ let readline_input = function
|
||||
| k -> `Unhandled k
|
||||
|
||||
let emacs_bindings = function
|
||||
- | `Key (`Uchar 0x41, [`Ctrl]) (* C-a *) -> `Ok (fun (pre, post) -> ([], pre @ post))
|
||||
- | `Key (`Uchar 0x45, [`Ctrl]) (* C-e *) -> `Ok (fun (pre, post) -> (pre @ post, []))
|
||||
+ | `Key (`Uchar u, [`Ctrl]) as k ->
|
||||
+ begin match Uchar.to_int u with
|
||||
+ | 0x41 (* C-a *) -> `Ok (fun (pre, post) -> ([], pre @ post))
|
||||
+ | 0x45 (* C-e *) -> `Ok (fun (pre, post) -> (pre @ post, []))
|
||||
|
||||
- | `Key (`Uchar 0x4b, [`Ctrl]) (* C-k *) -> `Ok (fun (pre, _) -> (pre, []))
|
||||
- | `Key (`Uchar 0x55, [`Ctrl]) (* C-u *) -> `Ok (fun (_, post) -> ([], post))
|
||||
+ | 0x4b (* C-k *) -> `Ok (fun (pre, _) -> (pre, []))
|
||||
+ | 0x55 (* C-u *) -> `Ok (fun (_, post) -> ([], post))
|
||||
|
||||
- | `Key (`Uchar 0x46, [`Ctrl]) (* C-f *) ->
|
||||
+ | 0x46 (* C-f *) ->
|
||||
`Ok (fun (pre, post) ->
|
||||
match post with
|
||||
| [] -> (pre, post)
|
||||
| hd::tl -> (pre @ [hd], tl))
|
||||
- | `Key (`Uchar 0x42, [`Ctrl]) (* C-b *) ->
|
||||
+ | 0x42 (* C-b *) ->
|
||||
`Ok (fun (pre, post) ->
|
||||
match List.rev pre with
|
||||
| [] -> ([], post)
|
||||
| hd::tl -> (List.rev tl, hd :: post))
|
||||
+ | _ -> `Unhandled k
|
||||
+ end
|
||||
|
||||
| `Key (`Arrow `Left, [`Ctrl]) ->
|
||||
`Ok (fun (pre, post) ->
|
||||
diff --git a/src/contact.mli b/src/contact.mli
|
||||
index 6926296..d6c795b 100644
|
||||
--- a/src/contact.mli
|
||||
+++ b/src/contact.mli
|
||||
@@ -8,7 +8,7 @@ val bare : contact -> Xjid.bare_jid
|
||||
val preserve_messages : contact -> bool
|
||||
val expanded : contact -> bool
|
||||
val messages : contact -> User.message list
|
||||
-val input_buffer : contact -> (int list * int list)
|
||||
+val input_buffer : contact -> (Uchar.t list * Uchar.t list)
|
||||
|
||||
val readline_history : contact -> string list
|
||||
val add_readline_history : contact -> string -> contact
|
||||
@@ -18,7 +18,7 @@ val set_history_position : contact -> int -> contact
|
||||
val received : contact -> string -> contact
|
||||
|
||||
val expand : contact -> contact
|
||||
-val set_input_buffer : contact -> (int list * int list) -> contact
|
||||
+val set_input_buffer : contact -> (Uchar.t list * Uchar.t list) -> contact
|
||||
val set_preserve_messages : contact -> bool -> contact
|
||||
|
||||
val reset : contact -> contact
|
||||
diff --git a/src/muc.ml b/src/muc.ml
|
||||
index 1c98037..3293541 100644
|
||||
--- a/src/muc.ml
|
||||
+++ b/src/muc.ml
|
||||
@@ -132,7 +132,7 @@ type groupchat = {
|
||||
expand : bool ;
|
||||
preserve_messages : bool ;
|
||||
message_history : User.message list ; (* persistent if preserve_messages *)
|
||||
- input_buffer : (int list * int list) ;
|
||||
+ input_buffer : (Uchar.t list * Uchar.t list) ;
|
||||
readline_history : string list ;
|
||||
history_position : int ;
|
||||
autojoin : bool ;
|
||||
diff --git a/src/user.ml b/src/user.ml
|
||||
index d039278..42a8c47 100644
|
||||
--- a/src/user.ml
|
||||
+++ b/src/user.ml
|
||||
@@ -229,7 +229,7 @@ type user = {
|
||||
properties : property list ;
|
||||
preserve_messages : bool ;
|
||||
message_history : message list ; (* persistent if preserve_messages is true *)
|
||||
- input_buffer: (int list * int list) ; (* not persistent *)
|
||||
+ input_buffer: (Uchar.t list * Uchar.t list) ; (* not persistent *)
|
||||
readline_history : string list ; (* not persistent *)
|
||||
history_position : int ; (* not persistent *)
|
||||
otr_fingerprints : fingerprint list ;
|
||||
diff --git a/src/user.mli b/src/user.mli
|
||||
index 52b503d..5ce41be 100644
|
||||
--- a/src/user.mli
|
||||
+++ b/src/user.mli
|
||||
@@ -118,7 +118,7 @@ type user = {
|
||||
properties : property list ;
|
||||
preserve_messages : bool ;
|
||||
message_history : message list ; (* persistent if preserve_messages is true *)
|
||||
- input_buffer: (int list * int list) ; (* not persistent *)
|
||||
+ input_buffer: (Uchar.t list * Uchar.t list) ; (* not persistent *)
|
||||
readline_history : string list ; (* not persistent *)
|
||||
history_position : int ;
|
||||
otr_fingerprints : fingerprint list ;
|
||||
diff --git a/src/utils.ml b/src/utils.ml
|
||||
index 0b4a3a7..cd9cb10 100644
|
||||
--- a/src/utils.ml
|
||||
+++ b/src/utils.ml
|
||||
@@ -30,31 +30,33 @@ let validate_utf8 txt =
|
||||
let rec loop d buf = match Uutf.decode d with
|
||||
| `Await -> Buffer.contents buf
|
||||
| `End -> Buffer.contents buf
|
||||
- | `Malformed _ -> if !unicode then Uutf.Buffer.add_utf_8 buf 0xFFFD; loop d buf
|
||||
- | `Uchar 0x000A -> (* newline *) Uutf.Buffer.add_utf_8 buf 0x000A ; loop d buf
|
||||
- | `Uchar 0x0009 -> (* tab -> 4 spaces *) Uutf.Buffer.add_utf_8 buf 0x0020 ; Uutf.Buffer.add_utf_8 buf 0x0020 ; Uutf.Buffer.add_utf_8 buf 0x0020 ; Uutf.Buffer.add_utf_8 buf 0x0020 ; loop d buf
|
||||
- | `Uchar 0x007F (* DEL *)
|
||||
+ | `Malformed _ -> if !unicode then Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0xFFFD); loop d buf
|
||||
+ | `Uchar u ->
|
||||
+ match Uchar.to_int u with
|
||||
+ | 0x000A -> (* newline *) Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0x000A) ; loop d buf
|
||||
+ | 0x0009 -> (* tab -> 4 spaces *) Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0x0020) ; Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0x0020) ; Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0x0020) ; Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0x0020) ; loop d buf
|
||||
+ | 0x007F (* DEL *)
|
||||
(* See https://en.wikipedia.org/wiki/Unicode_control_characters / https://en.wikipedia.org/wiki/Bi-directional_text *)
|
||||
- | `Uchar 0x200E | `Uchar 0x200F (* left-to-right / right-to-left *)
|
||||
- | `Uchar 0x202A | `Uchar 0x202D (* left-to-right embedding / override *)
|
||||
- | `Uchar 0x202B | `Uchar 0x202E (* right-to-left embedding / override *)
|
||||
- | `Uchar 0x202C (* pop directional format *)
|
||||
- | `Uchar 0x2066 | `Uchar 0x2067 (* l-t-r isolate r-t-l isolate *)
|
||||
- | `Uchar 0x2068 | `Uchar 0x2069 (* first strong isolate / pop directional isolate *)
|
||||
- | `Uchar 0x2028 | `Uchar 0x2029 (* line separator / page separator *) ->
|
||||
- if !unicode then Uutf.Buffer.add_utf_8 buf 0xFFFD ; loop d buf
|
||||
- | `Uchar x when x < 0x20 ->
|
||||
+ | 0x200E | 0x200F (* left-to-right / right-to-left *)
|
||||
+ | 0x202A | 0x202D (* left-to-right embedding / override *)
|
||||
+ | 0x202B | 0x202E (* right-to-left embedding / override *)
|
||||
+ | 0x202C (* pop directional format *)
|
||||
+ | 0x2066 | 0x2067 (* l-t-r isolate r-t-l isolate *)
|
||||
+ | 0x2068 | 0x2069 (* first strong isolate / pop directional isolate *)
|
||||
+ | 0x2028 | 0x2029 (* line separator / page separator *) ->
|
||||
+ if !unicode then Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0xFFFD) ; loop d buf
|
||||
+ | x when x < 0x20 ->
|
||||
(* other control characters *)
|
||||
- if !unicode then Uutf.Buffer.add_utf_8 buf 0xFFFD ; loop d buf
|
||||
- | `Uchar x when x >= 0x0080 && x <= 0x009F ->
|
||||
+ if !unicode then Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0xFFFD) ; loop d buf
|
||||
+ | x when x >= 0x0080 && x <= 0x009F ->
|
||||
(* ctrl chars used in conjunction with ISO 8859 character sets (C0/C1) *)
|
||||
- if !unicode then Uutf.Buffer.add_utf_8 buf 0xFFFD ; loop d buf
|
||||
+ if !unicode then Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0xFFFD) ; loop d buf
|
||||
|
||||
- | `Uchar x ->
|
||||
+ | x ->
|
||||
let c = if !unicode then x else if x > 0xff then 0x3f else x in
|
||||
- Uutf.Buffer.add_utf_8 buf c ; loop d buf
|
||||
+ Uutf.Buffer.add_utf_8 buf (Uchar.of_int c) ; loop d buf
|
||||
in
|
||||
- let nln = `Readline 0x000A in
|
||||
+ let nln = `Readline (Uchar.of_int 0x000A) in
|
||||
loop (Uutf.decoder ~nln ~encoding:`UTF_8 (`String txt)) (Buffer.create (String.length txt))
|
||||
|
||||
let version = "%%VERSION_NUM%%"
|
@ -0,0 +1,31 @@ |
||||
{ stdenv, fetchFromGitHub, fetchpatch, cmake, python, vim }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
name = "cryptominisat-${version}"; |
||||
version = "5.0.1"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "msoos"; |
||||
repo = "cryptominisat"; |
||||
rev = version; |
||||
sha256 = "0cpw5d9vplxvv3aaplhnga55gz1hy29p7s4pkw1306knkbhlzvkb"; |
||||
}; |
||||
|
||||
# vim for xxd binary |
||||
buildInputs = [ python vim ]; |
||||
nativeBuildInputs = [ cmake ]; |
||||
|
||||
patches = [(fetchpatch rec { |
||||
name = "fix-exported-library-name.patch"; |
||||
url = "https://github.com/msoos/cryptominisat/commit/7a47795cbe5ad5a899731102d297f234bcade077.patch"; |
||||
sha256 = "11hf3cfqs4cykn7rlgjglq29lzqfxvlm0f20qasi0kdrz01cr30f"; |
||||
})]; |
||||
|
||||
meta = with stdenv.lib; { |
||||
description = "An advanced SAT Solver"; |
||||
maintainers = with maintainers; [ mic92 ]; |
||||
platforms = platforms.unix; |
||||
license = licenses.mit; |
||||
homepage = https://github.com/msoos/cryptominisat; |
||||
}; |
||||
} |
@ -0,0 +1,23 @@ |
||||
{ stdenv, fetchFromGitHub, zlib, cmake }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
name = "minisat-unstable-2013-09-25"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "niklasso"; |
||||
repo = "minisat"; |
||||
rev = "37dc6c67e2af26379d88ce349eb9c4c6160e8543"; |
||||
sha256 = "091hf3qkm197s5r7xcr3m07xsdwyz2rqk1hc9kj0hn13imz09irq"; |
||||
}; |
||||
|
||||
buildInputs = [ zlib ]; |
||||
nativeBuildInputs = [ cmake ]; |
||||
|
||||
meta = with stdenv.lib; { |
||||
description = "Compact and readable SAT solver"; |
||||
maintainers = with maintainers; [ mic92 ]; |
||||
platforms = platforms.unix; |
||||
license = licenses.mit; |
||||
homepage = "http://minisat.se/"; |
||||
}; |
||||
} |
@ -1,23 +1,32 @@ |
||||
{stdenv, cmake, boost, bison, flex, fetchgit, perl, zlib}: |
||||
{ stdenv, cmake, boost, bison, flex, fetchFromGitHub, perl, python3, python3Packages, zlib, minisatUnstable, cryptominisat }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
version = "2014.01.07"; |
||||
version = "2.2.0"; |
||||
name = "stp-${version}"; |
||||
src = fetchgit { |
||||
url = "git://github.com/stp/stp"; |
||||
rev = "3aa11620a823d617fc033d26aedae91853d18635"; |
||||
sha256 = "832520787f57f63cf47364d080f30ad10d6d6e00f166790c19b125be3d6dd45c"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "stp"; |
||||
repo = "stp"; |
||||
rev = "stp-${version}"; |
||||
sha256 = "1jh23wjm62nnqfx447g2y53bbangq04hjrvqc35v9xxpcjgj3i49"; |
||||
}; |
||||
buildInputs = [ cmake boost bison flex perl zlib ]; |
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; |
||||
patchPhase = '' |
||||
sed -e 's,^export(PACKAGE.*,,' -i CMakeLists.txt |
||||
patch -p1 < ${./fixbuild.diff} |
||||
patch -p1 < ${./fixrefs.diff} |
||||
|
||||
buildInputs = [ boost zlib minisatUnstable cryptominisat python3 ]; |
||||
nativeBuildInputs = [ cmake bison flex perl ]; |
||||
preConfigure = '' |
||||
python_install_dir=$out/${python3Packages.python.sitePackages} |
||||
mkdir -p $python_install_dir |
||||
cmakeFlagsArray=( |
||||
$cmakeFlagsArray |
||||
"-DBUILD_SHARED_LIBS=ON" |
||||
"-DPYTHON_LIB_INSTALL_DIR=$python_install_dir" |
||||
) |
||||
''; |
||||
meta = { |
||||
description = ''Simple Theorem Prover''; |
||||
maintainers = with stdenv.lib.maintainers; [mornfall]; |
||||
platforms = with stdenv.lib.platforms; linux; |
||||
license = stdenv.lib.licenses.mit; |
||||
|
||||
meta = with stdenv.lib; { |
||||
description = "Simple Theorem Prover"; |
||||
maintainers = with maintainers; [ mornfall ]; |
||||
platforms = platforms.linux; |
||||
license = licenses.mit; |
||||
}; |
||||
} |
||||
|
@ -1,45 +0,0 @@ |
||||
diff --git a/src/libstp/CMakeLists.txt b/src/libstp/CMakeLists.txt
|
||||
index 83bd03a..9c0304b 100644
|
||||
--- a/src/libstp/CMakeLists.txt
|
||||
+++ b/src/libstp/CMakeLists.txt
|
||||
@@ -23,6 +23,15 @@ set(stp_lib_targets
|
||||
printer
|
||||
)
|
||||
|
||||
+include_directories(${CMAKE_SOURCE_DIR}/src/AST/)
|
||||
+include_directories(${CMAKE_BINARY_DIR}/src/AST/)
|
||||
+
|
||||
+add_library(globalstp OBJECT
|
||||
+ ../main/Globals.cpp
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/../main/GitSHA1.cpp
|
||||
+)
|
||||
+add_dependencies(globalstp ASTKind_header)
|
||||
+
|
||||
# Create list of objects and gather list of
|
||||
# associated public headers.
|
||||
set(stp_lib_objects "")
|
||||
@@ -31,6 +40,7 @@ foreach(target ${stp_lib_targets})
|
||||
list(APPEND stp_lib_objects $<TARGET_OBJECTS:${target}>)
|
||||
|
||||
get_target_property(TARGETS_PUBLIC_HEADERS ${target} PUBLIC_HEADER)
|
||||
+ set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
if (EXISTS "${TARGETS_PUBLIC_HEADERS}")
|
||||
list(APPEND stp_public_headers "${TARGETS_PUBLIC_HEADERS}")
|
||||
message("Adding public header(s) ${TARGETS_PUBLIC_HEADERS} to target libstp")
|
||||
diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt
|
||||
index 0735137..73039f5 100644
|
||||
--- a/src/main/CMakeLists.txt
|
||||
+++ b/src/main/CMakeLists.txt
|
||||
@@ -3,12 +3,6 @@ include_directories(${CMAKE_BINARY_DIR}/src/AST/)
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/GitSHA1.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp" @ONLY)
|
||||
|
||||
-add_library(globalstp OBJECT
|
||||
- Globals.cpp
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp
|
||||
-)
|
||||
-add_dependencies(globalstp ASTKind_header)
|
||||
-
|
||||
# -----------------------------------------------------------------------------
|
||||
# Create binary
|
||||
# -----------------------------------------------------------------------------
|
@ -1,192 +0,0 @@ |
||||
commit 53b6043e25b2eba264faab845077fbf6736cf22f
|
||||
Author: Petr Rockai <me@mornfall.net>
|
||||
Date: Tue Jan 7 13:30:07 2014 +0100
|
||||
|
||||
aig: Comment out unused functions with undefined references in them.
|
||||
|
||||
diff --git a/src/extlib-abc/aig/aig/aigPart.c b/src/extlib-abc/aig/aig/aigPart.c
|
||||
index a4cc116..5bd5f08 100644
|
||||
--- a/src/extlib-abc/aig/aig/aigPart.c
|
||||
+++ b/src/extlib-abc/aig/aig/aigPart.c
|
||||
@@ -869,6 +869,7 @@ Vec_Ptr_t * Aig_ManMiterPartitioned( Aig_Man_t * p1, Aig_Man_t * p2, int nPartSi
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
+#if 0
|
||||
Aig_Man_t * Aig_ManChoicePartitioned( Vec_Ptr_t * vAigs, int nPartSize )
|
||||
{
|
||||
extern int Cmd_CommandExecute( void * pAbc, char * sCommand );
|
||||
@@ -981,6 +982,7 @@ Aig_Man_t * Aig_ManChoicePartitioned( Vec_Ptr_t * vAigs, int nPartSize )
|
||||
Aig_ManMarkValidChoices( pAig );
|
||||
return pAig;
|
||||
}
|
||||
+#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/src/extlib-abc/aig/aig/aigShow.c b/src/extlib-abc/aig/aig/aigShow.c
|
||||
index ae8fa8b..f04eedc 100644
|
||||
--- a/src/extlib-abc/aig/aig/aigShow.c
|
||||
+++ b/src/extlib-abc/aig/aig/aigShow.c
|
||||
@@ -326,6 +326,7 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t *
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
+#if 0
|
||||
void Aig_ManShow( Aig_Man_t * pMan, int fHaig, Vec_Ptr_t * vBold )
|
||||
{
|
||||
extern void Abc_ShowFile( char * FileNameDot );
|
||||
@@ -347,7 +348,7 @@ void Aig_ManShow( Aig_Man_t * pMan, int fHaig, Vec_Ptr_t * vBold )
|
||||
// visualize the file
|
||||
Abc_ShowFile( FileNameDot );
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/// END OF FILE ///
|
||||
diff --git a/src/extlib-abc/aig/dar/darRefact.c b/src/extlib-abc/aig/dar/darRefact.c
|
||||
index d744b4f..23fc3d5 100644
|
||||
--- a/src/extlib-abc/aig/dar/darRefact.c
|
||||
+++ b/src/extlib-abc/aig/dar/darRefact.c
|
||||
@@ -340,6 +340,7 @@ printf( "\n" );
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
+#if 0
|
||||
int Dar_ManRefactorTryCuts( Ref_Man_t * p, Aig_Obj_t * pObj, int nNodesSaved, int Required )
|
||||
{
|
||||
Vec_Ptr_t * vCut;
|
||||
@@ -428,6 +429,7 @@ int Dar_ManRefactorTryCuts( Ref_Man_t * p, Aig_Obj_t * pObj, int nNodesSaved, in
|
||||
}
|
||||
return p->GainBest;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
@@ -461,6 +463,7 @@ int Dar_ObjCutLevelAchieved( Vec_Ptr_t * vCut, int nLevelMin )
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
+#if 0
|
||||
int Dar_ManRefactor( Aig_Man_t * pAig, Dar_RefPar_t * pPars )
|
||||
{
|
||||
// Bar_Progress_t * pProgress;
|
||||
@@ -583,6 +586,7 @@ p->timeOther = p->timeTotal - p->timeCuts - p->timeEval;
|
||||
return 1;
|
||||
|
||||
}
|
||||
+#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/// END OF FILE ///
|
||||
diff --git a/src/extlib-abc/aig/dar/darScript.c b/src/extlib-abc/aig/dar/darScript.c
|
||||
index e60df00..1b9c24f 100644
|
||||
--- a/src/extlib-abc/aig/dar/darScript.c
|
||||
+++ b/src/extlib-abc/aig/dar/darScript.c
|
||||
@@ -64,6 +64,7 @@ Aig_Man_t * Dar_ManRewriteDefault( Aig_Man_t * pAig )
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
+#if 0
|
||||
Aig_Man_t * Dar_ManRwsat( Aig_Man_t * pAig, int fBalance, int fVerbose )
|
||||
//alias rwsat "st; rw -l; b -l; rw -l; rf -l"
|
||||
{
|
||||
@@ -108,7 +109,7 @@ Aig_Man_t * Dar_ManRwsat( Aig_Man_t * pAig, int fBalance, int fVerbose )
|
||||
|
||||
return pAig;
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
@@ -121,6 +122,7 @@ Aig_Man_t * Dar_ManRwsat( Aig_Man_t * pAig, int fBalance, int fVerbose )
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
+#if 0
|
||||
Aig_Man_t * Dar_ManCompress( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fVerbose )
|
||||
//alias compress2 "b -l; rw -l; rwz -l; b -l; rwz -l; b -l"
|
||||
{
|
||||
@@ -180,6 +182,7 @@ Aig_Man_t * Dar_ManCompress( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, i
|
||||
|
||||
return pAig;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
@@ -192,6 +195,7 @@ Aig_Man_t * Dar_ManCompress( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, i
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
+#if 0
|
||||
Aig_Man_t * Dar_ManCompress2( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fVerbose )
|
||||
//alias compress2 "b -l; rw -l; rf -l; b -l; rw -l; rwz -l; b -l; rfz -l; rwz -l; b -l"
|
||||
{
|
||||
@@ -285,6 +289,7 @@ Aig_Man_t * Dar_ManCompress2( Aig_Man_t * pAig, int fBalance, int fUpdateLevel,
|
||||
}
|
||||
return pAig;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
@@ -297,6 +302,7 @@ Aig_Man_t * Dar_ManCompress2( Aig_Man_t * pAig, int fBalance, int fUpdateLevel,
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
+#if 0
|
||||
Vec_Ptr_t * Dar_ManChoiceSynthesis( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fVerbose )
|
||||
//alias resyn "b; rw; rwz; b; rwz; b"
|
||||
//alias resyn2 "b; rw; rf; b; rw; rwz; b; rfz; rwz; b"
|
||||
@@ -311,6 +317,7 @@ Vec_Ptr_t * Dar_ManChoiceSynthesis( Aig_Man_t * pAig, int fBalance, int fUpdateL
|
||||
Vec_PtrPush( vAigs, pAig );
|
||||
return vAigs;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
diff --git a/src/extlib-abc/aig/kit/kitAig.c b/src/extlib-abc/aig/kit/kitAig.c
|
||||
index de301f2..7e5df0f 100644
|
||||
--- a/src/extlib-abc/aig/kit/kitAig.c
|
||||
+++ b/src/extlib-abc/aig/kit/kitAig.c
|
||||
@@ -95,6 +95,7 @@ Aig_Obj_t * Kit_GraphToAig( Aig_Man_t * pMan, Aig_Obj_t ** pFanins, Kit_Graph_t
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
+#if 0
|
||||
Aig_Obj_t * Kit_TruthToAig( Aig_Man_t * pMan, Aig_Obj_t ** pFanins, unsigned * pTruth, int nVars, Vec_Int_t * vMemory )
|
||||
{
|
||||
Aig_Obj_t * pObj;
|
||||
@@ -113,6 +114,7 @@ Aig_Obj_t * Kit_TruthToAig( Aig_Man_t * pMan, Aig_Obj_t ** pFanins, unsigned * p
|
||||
Kit_GraphFree( pGraph );
|
||||
return pObj;
|
||||
}
|
||||
+#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/// END OF FILE ///
|
||||
diff --git a/src/extlib-abc/aig/kit/kitGraph.c b/src/extlib-abc/aig/kit/kitGraph.c
|
||||
index 39ef587..0485c66 100644
|
||||
--- a/src/extlib-abc/aig/kit/kitGraph.c
|
||||
+++ b/src/extlib-abc/aig/kit/kitGraph.c
|
||||
@@ -349,6 +349,7 @@ unsigned Kit_GraphToTruth( Kit_Graph_t * pGraph )
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
+#if 0
|
||||
Kit_Graph_t * Kit_TruthToGraph( unsigned * pTruth, int nVars, Vec_Int_t * vMemory )
|
||||
{
|
||||
Kit_Graph_t * pGraph;
|
||||
@@ -365,6 +366,7 @@ Kit_Graph_t * Kit_TruthToGraph( unsigned * pTruth, int nVars, Vec_Int_t * vMemor
|
||||
pGraph = Kit_SopFactor( vMemory, RetValue, nVars, vMemory );
|
||||
return pGraph;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/**Function*************************************************************
|
||||
|
@ -0,0 +1,13 @@ |
||||
diff --git a/utils/llvm-build/llvmbuild/main.py b/utils/llvm-build/llvmbuild/main.py
|
||||
index eacefdf60bf..40d25f5cef8 100644
|
||||
--- a/utils/llvm-build/llvmbuild/main.py
|
||||
+++ b/utils/llvm-build/llvmbuild/main.py
|
||||
@@ -412,7 +412,7 @@ subdirectories = %s
|
||||
if library_name is None:
|
||||
library_name_as_cstr = '0'
|
||||
else:
|
||||
- library_name_as_cstr = '"lib%s.a"' % library_name
|
||||
+ library_name_as_cstr = '"lib%s.so"' % library_name
|
||||
f.write(' { "%s", %s, %d, { %s } },\n' % (
|
||||
name, library_name_as_cstr, is_installed,
|
||||
', '.join('"%s"' % dep
|
@ -0,0 +1,34 @@ |
||||
{ stdenv, fetchgit }: |
||||
|
||||
stdenv.mkDerivation { |
||||
name = "libhdhomerun-1efbcb"; |
||||
|
||||
src = fetchgit { |
||||
url = "git://github.com/Silicondust/libhdhomerun.git"; |
||||
rev = "1efbcb2b87b17a82f2b3d873d1c9cc1c6a3a9b77"; |
||||
sha256 = "11iyrfs98xb50n9iqnwfphmmnn5w3mq2l9cjjpf8qp29cvs33cgy"; |
||||
}; |
||||
|
||||
patchPhase = stdenv.lib.optionalString stdenv.isDarwin '' |
||||
substituteInPlace Makefile --replace "gcc" "cc" |
||||
substituteInPlace Makefile --replace "-arch i386" "" |
||||
''; |
||||
|
||||
installPhase = let |
||||
libSuff = if stdenv.isDarwin then "dylib" else "so"; |
||||
in '' |
||||
mkdir -p $out/{bin,lib,include/hdhomerun} |
||||
install -Dm444 libhdhomerun.${libSuff} $out/lib |
||||
install -Dm555 hdhomerun_config $out/bin |
||||
cp *.h $out/include/hdhomerun |
||||
''; |
||||
|
||||
meta = with stdenv.lib; { |
||||
description = "Implements the libhdhomerun protocol for use with Silicondust HDHomeRun TV tuners"; |
||||
homepage = "https://github.com/Silicondust/libhdhomerun"; |
||||
repositories.git = "https://github.com/Silicondust/libhdhomerun.git"; |
||||
license = stdenv.lib.licenses.lgpl2; |
||||
platforms = stdenv.lib.platforms.unix; |
||||
maintainers = [ maintainers.titanous ]; |
||||
}; |
||||
} |
@ -0,0 +1,27 @@ |
||||
{ stdenv, buildPythonPackage, fetchPypi, pythonOlder |
||||
, mock, pytest, pytestrunner |
||||
, configparser, enum34, mccabe, pycodestyle, pyflakes |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
name = "${pname}-${version}"; |
||||
pname = "flake8"; |
||||
version = "3.3.0"; |
||||
|
||||
src = fetchPypi { |
||||
inherit pname version; |
||||
sha256 = "04izn1q1lgbr408l9b3vkxqmpi6mq47bxwc0iwypb02mrxns41xr"; |
||||
}; |
||||
|
||||
buildInputs = [ pytest mock pytestrunner ]; |
||||
propagatedBuildInputs = [ pyflakes pycodestyle mccabe ] |
||||
++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ] |
||||
++ stdenv.lib.optionals (pythonOlder "3.2") [ configparser ]; |
||||
|
||||
meta = with stdenv.lib; { |
||||
description = "Code checking using pep8 and pyflakes"; |
||||
homepage = http://pypi.python.org/pypi/flake8; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ garbas ]; |
||||
}; |
||||
} |
@ -0,0 +1,21 @@ |
||||
{ stdenv, buildPythonPackage, fetchPypi, pytest, pytestrunner }: |
||||
|
||||
buildPythonPackage rec { |
||||
name = "${pname}-${version}"; |
||||
pname = "mccabe"; |
||||
version = "0.6.1"; |
||||
|
||||
src = fetchPypi { |
||||
inherit pname version; |
||||
sha256 = "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"; |
||||
}; |
||||
|
||||
buildInputs = [ pytest pytestrunner ]; |
||||
|
||||
meta = with stdenv.lib; { |
||||
description = "McCabe checker, plugin for flake8"; |
||||
homepage = "https://github.com/flintwork/mccabe"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ garbas ]; |
||||
}; |
||||
} |
@ -0,0 +1,53 @@ |
||||
{ stdenv, buildPythonPackage, fetchFromGitHub, isPy26 |
||||
, glibcLocales, pandoc, git |
||||
, mock, nose, markdown, lxml, typogrify |
||||
, jinja2, pygments, docutils, pytz, unidecode, six, dateutil, feedgenerator |
||||
, blinker, pillow, beautifulsoup4, markupsafe }: |
||||
|
||||
buildPythonPackage rec { |
||||
name = "pelican-${version}"; |
||||
version = "3.7.1"; |
||||
disabled = isPy26; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "getpelican"; |
||||
repo = "pelican"; |
||||
rev = version; |
||||
sha256 = "0nkxrb77k2bra7bqckg7f5k73wk98hcbz7rimxl8sw05b2bvd62g"; |
||||
}; |
||||
|
||||
doCheck = true; |
||||
|
||||
checkPhase = '' |
||||
python -Wd -m unittest discover |
||||
''; |
||||
|
||||
buildInputs = [ |
||||
glibcLocales |
||||
pandoc |
||||
git |
||||
mock |
||||
nose |
||||
markdown |
||||
typogrify |
||||
]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
jinja2 pygments docutils pytz unidecode six dateutil feedgenerator |
||||
blinker pillow beautifulsoup4 markupsafe lxml |
||||
]; |
||||
|
||||
postPatch= '' |
||||
substituteInPlace pelican/tests/test_pelican.py \ |
||||
--replace "'git'" "'${git}/bin/git'" |
||||
''; |
||||
|
||||
LC_ALL="en_US.UTF-8"; |
||||
|
||||
meta = with stdenv.lib; { |
||||
description = "A tool to generate a static blog from reStructuredText or Markdown input files"; |
||||
homepage = "http://getpelican.com/"; |
||||
license = licenses.agpl3; |
||||
maintainers = with maintainers; [ offline prikhi garbas ]; |
||||
}; |
||||
} |
@ -0,0 +1,23 @@ |
||||
{ stdenv, buildPythonPackage, fetchPypi, isPyPy, unittest2 }: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "pyflakes"; |
||||
version = "1.5.0"; |
||||
name = "${pname}-${version}"; |
||||
|
||||
src = fetchPypi { |
||||
inherit pname version; |
||||
sha256 = "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da"; |
||||
}; |
||||
|
||||
buildInputs = [ unittest2 ]; |
||||
|
||||
doCheck = !isPyPy; |
||||
|
||||
meta = with stdenv.lib; { |
||||
homepage = https://launchpad.net/pyflakes; |
||||
description = "A simple program which checks Python source files for errors"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ garbas ]; |
||||
}; |
||||
} |
@ -0,0 +1,95 @@ |
||||
{ stdenv, pythonPackages }: |
||||
|
||||
with stdenv.lib; |
||||
with pythonPackages; |
||||
|
||||
let |
||||
# Get rid of this when pants 1.3.0 is released and make 0.5 the default |
||||
pathspec_0_3_4 = buildPythonApplication rec { |
||||
pname = "pathspec"; |
||||
version = "0.3.4"; |
||||
name = "${pname}-${version}"; |
||||
|
||||
src = fetchPypi { |
||||
inherit pname version; |
||||
sha256 = "0a37yrr2jhlg8aiynxivh2xqani7l9j725qxzrm7cm7m4rfcl1bn"; |
||||
}; |
||||
|
||||
meta = { |
||||
description = "Utility library for gitignore-style pattern matching of file paths"; |
||||
homepage = "https://github.com/cpburnz/python-path-specification"; |
||||
license = licenses.mpl20; |
||||
maintainers = with maintainers; [ copumpkin ]; |
||||
}; |
||||
}; |
||||
in { |
||||
pants = |
||||
pythonPackages.buildPythonPackage rec { |
||||
pname = "pantsbuild.pants"; |
||||
version = "1.2.1"; |
||||
name = "${pname}-${version}"; |
||||
|
||||
src = fetchPypi { |
||||
inherit pname version; |
||||
sha256 = "1bnzhhd2acwk7ckv56xzg2d9vxacl3k5bh13bsjxymnq3spm962w"; |
||||
}; |
||||
|
||||
prePatch = '' |
||||
sed -E -i "s/'([[:alnum:].-]+)[=><][^']*'/'\\1'/g" setup.py |
||||
''; |
||||
|
||||
# Unnecessary, and causes some really weird behavior around .class files, which |
||||
# this package bundles. See https://github.com/NixOS/nixpkgs/issues/22520. |
||||
dontStrip = true; |
||||
|
||||
propagatedBuildInputs = [ |
||||
ansicolors beautifulsoup4 cffi coverage docutils fasteners futures |
||||
isort lmdb markdown mock packaging pathspec_0_3_4 pep8 pex psutil pyflakes |
||||
pygments pystache pytestcov pytest pywatchman requests scandir |
||||
setproctitle setuptools six thrift wheel twitter-common-dirutil |
||||
twitter-common-confluence twitter-common-collections |
||||
]; |
||||
|
||||
meta = { |
||||
description = "A build system for software projects in a variety of languages"; |
||||
homepage = "http://www.pantsbuild.org/"; |
||||
license = licenses.asl20; |
||||
maintainers = with maintainers; [ copumpkin ]; |
||||
platforms = platforms.unix; |
||||
}; |
||||
}; |
||||
|
||||
pants13-pre = buildPythonApplication rec { |
||||
pname = "pantsbuild.pants"; |
||||
version = "1.3.0rc2"; |
||||
name = "${pname}-${version}"; |
||||
|
||||
src = fetchPypi { |
||||
inherit pname version; |
||||
sha256 = "1d3i0jwhn94b96b3lwwxd10007hnxw6dw1azmwv3hhwq713gwnpi"; |
||||
}; |
||||
|
||||
prePatch = '' |
||||
sed -E -i "s/'([[:alnum:].-]+)[=><][[:digit:]=><.,]*'/'\\1'/g" setup.py |
||||
''; |
||||
|
||||
# Unnecessary, and causes some really weird behavior around .class files, which |
||||
# this package bundles. See https://github.com/NixOS/nixpkgs/issues/22520. |
||||
dontStrip = true; |
||||
|
||||
propagatedBuildInputs = [ |
||||
twitter-common-collections setproctitle setuptools six ansicolors |
||||
packaging pathspec scandir twitter-common-dirutil psutil requests |
||||
pystache pex docutils markdown pygments twitter-common-confluence |
||||
fasteners coverage pywatchman futures cffi |
||||
]; |
||||
|
||||
meta = { |
||||
description = "A build system for software projects in a variety of languages"; |
||||
homepage = "http://www.pantsbuild.org/"; |
||||
license = licenses.asl20; |
||||
maintainers = with maintainers; [ copumpkin ]; |
||||
platforms = platforms.unix; |
||||
}; |
||||
}; |
||||
} |
@ -0,0 +1,20 @@ |
||||
{ stdenv, python3Packages }: |
||||
|
||||
python3Packages.buildPythonApplication rec { |
||||
version = "1.1.3"; |
||||
pname = "wllvm"; |
||||
name = "${pname}-${version}"; |
||||
|
||||
src = python3Packages.fetchPypi { |
||||
inherit pname version; |
||||
sha256 = "1scv9bwr888x2km8njg0000xkj8pz73c0gjbphhqaj8vy87y25cb"; |
||||
}; |
||||
|
||||
meta = with stdenv.lib; { |
||||
homepage = https://github.com/travitch/whole-program-llvm; |
||||
description = "A wrapper script to build whole-program LLVM bitcode files"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ mic92 ]; |
||||
platforms = platforms.all; |
||||
}; |
||||
} |
@ -0,0 +1,24 @@ |
||||
{ stdenv, fetchurl, pkgconfig, ncurses }: |
||||
|
||||
with stdenv.lib; |
||||
stdenv.mkDerivation rec { |
||||
|
||||
name = "robotfindskitten-${version}"; |
||||
version = "2.7182818.701"; |
||||
|
||||
src = fetchurl { |
||||
url = "mirror://sourceforge/project/rfk/robotfindskitten-POSIX/mayan_apocalypse_edition/${name}.tar.gz"; |
||||
sha256 = "06fp6b4li50mzw83j3pkzqspm6dpgxgxw03b60xkxlkgg5qa6jbp"; |
||||
}; |
||||
|
||||
buildInputs = |
||||
[ pkgconfig ncurses ]; |
||||
|
||||
meta = { |
||||
description = "Yet another zen simulation; A simple find-the-kitten game"; |
||||
homepage = http://robotfindskitten.org/; |
||||
license = licenses.gpl2; |
||||
maintainers = [ maintainers.AndersonTorres ]; |
||||
platforms = platforms.unix; |
||||
}; |
||||
} |
@ -0,0 +1,42 @@ |
||||
{ stdenv, fetchurl, ncurses, xmlto }: |
||||
|
||||
with stdenv.lib; |
||||
stdenv.mkDerivation rec{ |
||||
|
||||
name = "vms-empire-${version}"; |
||||
version = "1.14"; |
||||
|
||||
src = fetchurl{ |
||||
url = "http://www.catb.org/~esr/vms-empire/${name}.tar.gz"; |
||||
sha256 = "0cymzhivvaahgqz0p11w25a710ls4w0jhyqj789jas5s07nvd890"; |
||||
}; |
||||
|
||||
buildInputs = |
||||
[ ncurses xmlto ]; |
||||
|
||||
patchPhase = '' |
||||
sed -i -e 's|^install: empire\.6 uninstall|install: empire.6|' -e 's|usr/||g' Makefile |
||||
''; |
||||
|
||||
hardeningDisable = [ "format" ]; |
||||
|
||||
makeFlags = [ "DESTDIR=$(out)" ]; |
||||
|
||||
meta = { |
||||
description = "The ancestor of all expand/explore/exploit/exterminate games"; |
||||
longDescription = '' |
||||
Empire is a simulation of a full-scale war between two emperors, the |
||||
computer and you. Naturally, there is only room for one, so the object of |
||||
the game is to destroy the other. The computer plays by the same rules |
||||
that you do. This game was ancestral to all later |
||||
expand/explore/exploit/exterminate games, including Civilization and |
||||
Master of Orion. |
||||
''; |
||||
homepage = http://catb.org/~esr/vms-empire/; |
||||
license = licenses.gpl2; |
||||
maintainers = [ maintainers.AndersonTorres ]; |
||||
platforms = platforms.linux; |
||||
}; |
||||
} |
||||
|
||||
|
@ -0,0 +1,36 @@ |
||||
{ stdenv, fetchgit, autoreconfHook, readline }: |
||||
|
||||
let |
||||
ell = fetchgit { |
||||
url = https://git.kernel.org/pub/scm/libs/ell/ell.git; |
||||
rev = "58e873d7463f3a7f91e02260585bfa50cbc77668"; |
||||
sha256 = "12k1f1iarm29j8k16mhw83xx7r3bama4lp0fchhnj7iwxrpgs4gh"; |
||||
}; |
||||
in stdenv.mkDerivation rec { |
||||
name = "iwd-unstable-2017-04-21"; |
||||
|
||||
src = fetchgit { |
||||
url = https://git.kernel.org/pub/scm/network/wireless/iwd.git; |
||||
rev = "f64dea81b8490e5e09888be645a4325419bb269c"; |
||||
sha256 = "0maqhx5264ykgmwaf90s2806i1kx2028if34ph2axlirxrhdd3lg"; |
||||
}; |
||||
|
||||
configureFlags = [ |
||||
"--with-dbusconfdir=$(out)/etc/" |
||||
]; |
||||
|
||||
postUnpack = '' |
||||
ln -s ${ell} ell |
||||
''; |
||||
|
||||
nativeBuildInputs = [ autoreconfHook ]; |
||||
|
||||
buildInputs = [ readline ]; |
||||
|
||||
meta = with stdenv.lib; { |
||||
homepage = https://git.kernel.org/pub/scm/network/wireless/iwd.git; |
||||
description = "Wireless daemon for Linux"; |
||||
platforms = platforms.linux; |
||||
maintainers = [ maintainers.mic92 ]; |
||||
}; |
||||
} |
@ -1,6 +1,6 @@ |
||||
{ callPackage, ... } @ args: |
||||
|
||||
callPackage ./generic.nix (args // { |
||||
version = "1.10.3"; |
||||
sha256 = "146xd566l1wkhzxqhmd01vj7c0yhsap1qkiwfg5mki6ach9hy0km"; |
||||
version = "1.12.0"; |
||||
sha256 = "0c2vg6530qplwk8rhldww5r3cwcbw1avka53qg9sh85nzlk2w8ml"; |
||||
}) |
||||
|
@ -0,0 +1,28 @@ |
||||
{ stdenv, fetchFromGitHub }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
name = "esptool-ck-${version}"; |
||||
version = "0.4.11"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "igrr"; |
||||
repo = "esptool-ck"; |
||||
rev = "0.4.11"; |
||||
sha256 = "086x68jza24xkaap8nici18kj78id2p2lzbasin98wilvpjc8d7f"; |
||||
}; |
||||
|
||||
makeFlags = [ "VERSION=${version}" ]; |
||||
|
||||
installPhase = '' |
||||
mkdir -p $out/bin |
||||
cp esptool $out/bin |
||||
''; |
||||
|
||||
meta = with stdenv.lib; { |
||||
description = "ESP8266/ESP32 build helper tool"; |
||||
homepage = https://github.com/igrr/esptool-ck; |
||||
license = licenses.gpl2; |
||||
maintainers = [ maintainers.dezgeg ]; |
||||
platforms = platforms.linux; |
||||
}; |
||||
} |
@ -0,0 +1,25 @@ |
||||
{ stdenv, fetchFromGitHub, python3 }: |
||||
|
||||
python3.pkgs.buildPythonApplication rec { |
||||
name = "esptool-${version}"; |
||||
version = "1.3"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "espressif"; |
||||
repo = "esptool"; |
||||
rev = "v${version}"; |
||||
sha256 = "0112fybkz4259gyvhcs18wa6938jp6w7clk66kpd0d1dg70lz1h6"; |
||||
}; |
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [ pyserial ]; |
||||
|
||||
doCheck = false; # FIXME: requires packaging some new deps |
||||
|
||||
meta = with stdenv.lib; { |
||||
description = "ESP8266 and ESP32 serial bootloader utility"; |
||||
homepage = https://github.com/espressif/esptool; |
||||
license = licenses.gpl2; |
||||
maintainers = [ maintainers.dezgeg ]; |
||||
platforms = platforms.linux; |
||||
}; |
||||
} |
@ -1,10 +1,10 @@ |
||||
{ callPackage, fetchurl }: |
||||
|
||||
callPackage ./generic.nix (rec { |
||||
version = "2017-05-15"; |
||||
version = "2017-05-22"; |
||||
src = fetchurl { |
||||
# Sadly hydra doesn't offer download links |
||||
url = "https://static.domenkozar.com/nixops-tarball-1.5.1pre2165_b2fdc43.tar.bz2"; |
||||
sha256 = "1x8jiskxynx0rzw356sz406bi2vl0vjs7747sbacq0bp1jlnpb2n"; |
||||
url = "https://static.domenkozar.com/nixops-1.5.1pre2169_8f4a67c.tar.bz2"; |
||||
sha256 = "0rma5npgkhlknmvm8z0ps54dsr07za1f32p6d6na3nis784h0slw"; |
||||
}; |
||||
}) |
||||
|
@ -0,0 +1,113 @@ |
||||
diff -ruN cloud-init-0.7.6.orig/cloudinit/distros/__init__.py cloud-init-0.7.6/cloudinit/distros/__init__.py
|
||||
--- cloud-init-0.7.6.orig/cloudinit/distros/__init__.py 2014-10-10 15:26:25.000000000 +0000
|
||||
+++ cloud-init-0.7.6/cloudinit/distros/__init__.py 2016-06-08 07:51:45.230357099 +0000
|
||||
@@ -43,6 +43,7 @@
|
||||
'freebsd': ['freebsd'],
|
||||
'suse': ['sles'],
|
||||
'arch': ['arch'],
|
||||
+ 'nixos': ['nixos'],
|
||||
}
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
diff -ruN cloud-init-0.7.6.orig/cloudinit/distros/nixos.py cloud-init-0.7.6/cloudinit/distros/nixos.py
|
||||
--- cloud-init-0.7.6.orig/cloudinit/distros/nixos.py 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ cloud-init-0.7.6/cloudinit/distros/nixos.py 2016-06-08 07:50:58.602616595 +0000
|
||||
@@ -0,0 +1,98 @@
|
||||
+# vi: ts=4 expandtab
|
||||
+#
|
||||
+# Copyright (C) 2012 Canonical Ltd.
|
||||
+# Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
|
||||
+# Copyright (C) 2012 Yahoo! Inc.
|
||||
+#
|
||||
+# Author: Scott Moser <scott.moser@canonical.com>
|
||||
+# Author: Juerg Haefliger <juerg.haefliger@hp.com>
|
||||
+# Author: Joshua Harlow <harlowja@yahoo-inc.com>
|
||||
+#
|
||||
+# This program is free software: you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License version 3, as
|
||||
+# published by the Free Software Foundation.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+from cloudinit import distros
|
||||
+from cloudinit import helpers
|
||||
+from cloudinit import log as logging
|
||||
+from cloudinit import util
|
||||
+
|
||||
+from cloudinit.distros.parsers.hostname import HostnameConf
|
||||
+
|
||||
+LOG = logging.getLogger(__name__)
|
||||
+
|
||||
+class Distro(distros.Distro):
|
||||
+
|
||||
+ def __init__(self, name, cfg, paths):
|
||||
+ distros.Distro.__init__(self, name, cfg, paths)
|
||||
+ # This will be used to restrict certain
|
||||
+ # calls from repeatly happening (when they
|
||||
+ # should only happen say once per instance...)
|
||||
+ self._runner = helpers.Runners(paths)
|
||||
+ self.osfamily = 'nixos'
|
||||
+
|
||||
+ def _select_hostname(self, hostname, fqdn):
|
||||
+ # Prefer the short hostname over the long
|
||||
+ # fully qualified domain name
|
||||
+ if not hostname:
|
||||
+ return fqdn
|
||||
+ return hostname
|
||||
+
|
||||
+ def _write_hostname(self, your_hostname, out_fn):
|
||||
+ conf = None
|
||||
+ try:
|
||||
+ # Try to update the previous one
|
||||
+ # so lets see if we can read it first.
|
||||
+ conf = self._read_hostname_conf(out_fn)
|
||||
+ except IOError:
|
||||
+ pass
|
||||
+ if not conf:
|
||||
+ conf = HostnameConf('')
|
||||
+ conf.set_hostname(your_hostname)
|
||||
+ util.write_file(out_fn, str(conf), 0644)
|
||||
+
|
||||
+ def _read_system_hostname(self):
|
||||
+ sys_hostname = self._read_hostname(self.hostname_conf_fn)
|
||||
+ return (self.hostname_conf_fn, sys_hostname)
|
||||
+
|
||||
+ def _read_hostname_conf(self, filename):
|
||||
+ conf = HostnameConf(util.load_file(filename))
|
||||
+ conf.parse()
|
||||
+ return conf
|
||||
+
|
||||
+ def _read_hostname(self, filename, default=None):
|
||||
+ hostname = None
|
||||
+ try:
|
||||
+ conf = self._read_hostname_conf(filename)
|
||||
+ hostname = conf.hostname
|
||||
+ except IOError:
|
||||
+ pass
|
||||
+ if not hostname:
|
||||
+ return default
|
||||
+ return hostname
|
||||
+
|
||||
+ def _write_network(self, settings):
|
||||
+ raise NotImplementedError()
|
||||
+
|
||||
+ def apply_locale(self, locale, out_fn=None):
|
||||
+ raise NotImplementedError()
|
||||
+
|
||||
+ def install_packages(self, pkglist):
|
||||
+ raise NotImplementedError()
|
||||
+
|
||||
+ def package_command(self, command, args=None, pkgs=None):
|
||||
+ raise NotImplementedError()
|
||||
+
|
||||
+ def set_timezone(self, tz):
|
||||
+ raise NotImplementedError()
|
||||
+
|
||||
+ def update_package_sources(self):
|
||||
+ raise NotImplementedError()
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue