Add LICENSE
This commit is contained in:
22
LICENSE
Normal file
22
LICENSE
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright © 2026 Ethan Girouard
|
||||||
|
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the “Software”), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
9
flake.nix
Normal file
9
flake.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
outputs =
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
overlays.default = import ./overlay.nix;
|
||||||
|
};
|
||||||
|
}
|
||||||
92
overlay.nix
Normal file
92
overlay.nix
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
final: prev: {
|
||||||
|
rustPlatform = prev.rustPlatform // {
|
||||||
|
buildDioxusWebApp = prev.lib.extendMkDerivation {
|
||||||
|
constructDrv = prev.rustPlatform.buildRustPackage;
|
||||||
|
|
||||||
|
excludeDrvArgNames = [
|
||||||
|
"extraServerFeatures"
|
||||||
|
"extraClientFeatures"
|
||||||
|
"extraServerBundleArgs"
|
||||||
|
"extraClientBundleArgs"
|
||||||
|
"serverBundleArgs"
|
||||||
|
"clientBundleArgs"
|
||||||
|
];
|
||||||
|
|
||||||
|
extendDrvArgs =
|
||||||
|
finalAttrs:
|
||||||
|
let
|
||||||
|
buildTypeFlag = if finalAttrs.cargoBuildType == "release" then "--release" else "";
|
||||||
|
defaultFeaturesFlag =
|
||||||
|
if (finalAttrs.buildNoDefaultFeatures or false) then "--no-default-features" else "";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nativeBuildInputs ? [ ],
|
||||||
|
|
||||||
|
extraServerFeatures ? [ ],
|
||||||
|
extraClientFeatures ? [ ],
|
||||||
|
|
||||||
|
extraServerBundleArgs ? [ ],
|
||||||
|
extraClientBundleArgs ? [ ],
|
||||||
|
|
||||||
|
serverBundleArgs ?
|
||||||
|
let
|
||||||
|
serverFeatures = (finalAttrs.buildFeatures or [ ]) ++ extraServerFeatures;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
"--server"
|
||||||
|
"--frozen"
|
||||||
|
buildTypeFlag
|
||||||
|
defaultFeaturesFlag
|
||||||
|
]
|
||||||
|
++ extraServerBundleArgs
|
||||||
|
++ (if serverFeatures != [ ] then [ "--features" ] ++ serverFeatures else [ ]),
|
||||||
|
|
||||||
|
clientBundleArgs ?
|
||||||
|
let
|
||||||
|
clientFeatures = (finalAttrs.buildFeatures or [ ]) ++ extraClientFeatures;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
"--web"
|
||||||
|
"--frozen"
|
||||||
|
buildTypeFlag
|
||||||
|
defaultFeaturesFlag
|
||||||
|
]
|
||||||
|
++ extraClientBundleArgs
|
||||||
|
++ (if clientFeatures != [ ] then [ "--features" ] ++ clientFeatures else [ ]),
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
nativeBuildInputs =
|
||||||
|
with prev;
|
||||||
|
[
|
||||||
|
makeWrapper
|
||||||
|
dioxus-cli
|
||||||
|
lld
|
||||||
|
|
||||||
|
]
|
||||||
|
++ (if finalAttrs.cargoBuildType == "release" then [ binaryen ] else [ ])
|
||||||
|
++ nativeBuildInputs;
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
|
dx bundle \
|
||||||
|
--out-dir "$out" \
|
||||||
|
@server ${builtins.concatStringsSep " " serverBundleArgs} \
|
||||||
|
@client ${builtins.concatStringsSep " " clientBundleArgs}
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
makeWrapper "$out/server" "$out/bin/${finalAttrs.pname}" \
|
||||||
|
--set DIOXUS_PUBLIC_PATH "$out/public"
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user