Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

nix: drop xema in favor of typedstruct

+15 -63
+1 -1
apps/nix/.formatter.exs
··· 1 1 # Used by "mix format" 2 2 [ 3 3 inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"], 4 - import_deps: [:xema] 4 + import_deps: [:typedstruct] 5 5 ]
+5 -7
apps/nix/lib/nix/profile.ex
··· 12 12 caller = __CALLER__.module 13 13 14 14 quote do 15 - use Xema 15 + use TypedStruct 16 16 17 17 @derive Jason.Encoder 18 18 19 - xema_struct do 20 - field :current, Nix.Profile.Generation 19 + typedstruct do 20 + field :current, Nix.Profile.Generation, enforce: true 21 21 field :latest, Nix.Profile.Generation 22 - field :profiles, :list, items: Nix.Profile.Generation 23 - field :tags, :map 24 - 25 - required [:current] 22 + field :profiles, list(Nix.Profile.Generation), default: [] 23 + field :tags, map(), default: %{} 26 24 end 27 25 28 26 @behaviour Nix.Profile
+5 -7
apps/nix/lib/nix/profile/generation.ex
··· 1 1 defmodule Nix.Profile.Generation do 2 - use Xema 2 + use TypedStruct 3 3 4 4 @derive {Jason.Encoder, only: [:created, :link, :path]} 5 5 6 - xema_struct do 7 - field :created, DateTime 8 - field :link, :string 9 - field :path, :string 10 - 11 - required [:created, :link, :path] 6 + typedstruct do 7 + field :created, DateTime.t(), enforce: true 8 + field :link, String.t(), enforce: true 9 + field :path, String.t(), enforce: true 12 10 end 13 11 end
+3 -5
apps/nix/lib/nix/store_path.ex
··· 1 1 defmodule Nix.StorePath do 2 - use Xema 3 - 4 - xema_struct do 5 - field :path, :string 2 + use TypedStruct 6 3 7 - required [:path] 4 + typedstruct do 5 + field :path, String.t(), enforce: true 8 6 end 9 7 end
+1 -2
apps/nix/mix.exs
··· 30 30 {:erlexec, "~> 2.0"}, 31 31 {:igniter, only: [:dev, :test]}, 32 32 {:jason, "~> 1.0"}, 33 - {:typedstruct, "~> 0.5.4"}, 34 - {:xema, "~> 0.17"} 33 + {:typedstruct, "~> 0.5.4"} 35 34 ] 36 35 end 37 36 end
-2
mix.lock
··· 4 4 "cc_precompiler": {:hex, :cc_precompiler, "0.1.11", "8c844d0b9fb98a3edea067f94f616b3f6b29b959b6b3bf25fee94ffe34364768", [:mix], [{:elixir_make, "~> 0.7", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "3427232caf0835f94680e5bcf082408a70b48ad68a5f5c0b02a3bea9f3a075b9"}, 5 5 "cloak": {:hex, :cloak, "1.1.4", "aba387b22ea4d80d92d38ab1890cc528b06e0e7ef2a4581d71c3fdad59e997e7", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "92b20527b9aba3d939fab0dd32ce592ff86361547cfdc87d74edce6f980eb3d7"}, 6 6 "cloak_ecto": {:hex, :cloak_ecto, "1.3.0", "0de127c857d7452ba3c3367f53fb814b0410ff9c680a8d20fbe8b9a3c57a1118", [:mix], [{:cloak, "~> 1.1.1", [hex: :cloak, repo: "hexpm", optional: false]}, {:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}], "hexpm", "314beb0c123b8a800418ca1d51065b27ba3b15f085977e65c0f7b2adab2de1cc"}, 7 - "conv_case": {:hex, :conv_case, "0.2.3", "c1455c27d3c1ffcdd5f17f1e91f40b8a0bc0a337805a6e8302f441af17118ed8", [:mix], [], "hexpm", "88f29a3d97d1742f9865f7e394ed3da011abb7c5e8cc104e676fdef6270d4b4a"}, 8 7 "crontab": {:hex, :crontab, "1.2.0", "503611820257939d5d0fd272eb2b454f48a470435a809479ddc2c40bb515495c", [:mix], [{:ecto, "~> 1.0 or ~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "ebd7ef4d831e1b20fa4700f0de0284a04cac4347e813337978e25b4cc5cc2207"}, 9 8 "cuid2_ex": {:hex, :cuid2_ex, "0.2.0", "b594696ceef7367f8bee7be0a4b07227755e90a1740d6cc73e7670d70e5454d4", [:mix], [], "hexpm", "49c3b81c1864f146e1cc3674ad3984ec16583c253e08d4d71d69b808e0054ea1"}, 10 9 "db_connection": {:hex, :db_connection, "2.8.1", "9abdc1e68c34c6163f6fb96a96532272d13ad7ca45262156ae8b7ec6d9dc4bec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a61a3d489b239d76f326e03b98794fb8e45168396c925ef25feb405ed09da8fd"}, ··· 82 81 "uuidv7": {:hex, :uuidv7, "1.0.0", "659179b2e248b98f96e7e988b882d369c055b6ae7a836237ccca52cd4d0f6988", [:mix], [{:ecto, "~> 3.12", [hex: :ecto, repo: "hexpm", optional: false]}], "hexpm", "0ecd337108456f7d8b1a9a54ef435443d3f8c10a5b685bd866ef9e396b444cbc"}, 83 82 "websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"}, 84 83 "websock_adapter": {:hex, :websock_adapter, "0.5.9", "43dc3ba6d89ef5dec5b1d0a39698436a1e856d000d84bf31a3149862b01a287f", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "5534d5c9adad3c18a0f58a9371220d75a803bf0b9a3d87e6fe072faaeed76a08"}, 85 - "xema": {:hex, :xema, "0.17.5", "63874e29be626f7162d1e3f68d481e04442ce2438b4f4466f6b51dc9b763b45d", [:mix], [{:conv_case, "~> 0.2.2", [hex: :conv_case, repo: "hexpm", optional: false]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "b49bffe49a565ceeb6dcecbbed7044ccdea934d0716c77206e7f055f41d550b4"}, 86 84 }
-39
nix/packages/deps.nix
··· 250 250 in 251 251 drv; 252 252 253 - conv_case = 254 - let 255 - version = "0.2.3"; 256 - drv = buildMix { 257 - inherit version; 258 - name = "conv_case"; 259 - appConfigPath = ../../config; 260 - 261 - src = fetchHex { 262 - inherit version; 263 - pkg = "conv_case"; 264 - sha256 = "88f29a3d97d1742f9865f7e394ed3da011abb7c5e8cc104e676fdef6270d4b4a"; 265 - }; 266 - }; 267 - in 268 - drv; 269 - 270 253 crontab = 271 254 let 272 255 version = "1.2.0"; ··· 1459 1442 bandit 1460 1443 plug 1461 1444 websock 1462 - ]; 1463 - }; 1464 - in 1465 - drv; 1466 - 1467 - xema = 1468 - let 1469 - version = "0.17.5"; 1470 - drv = buildMix { 1471 - inherit version; 1472 - name = "xema"; 1473 - appConfigPath = ../../config; 1474 - 1475 - src = fetchHex { 1476 - inherit version; 1477 - pkg = "xema"; 1478 - sha256 = "b49bffe49a565ceeb6dcecbbed7044ccdea934d0716c77206e7f055f41d550b4"; 1479 - }; 1480 - 1481 - beamDeps = [ 1482 - conv_case 1483 - decimal 1484 1445 ]; 1485 1446 }; 1486 1447 in