This commit is contained in:
Sphereso 2024-07-05 14:37:39 +02:00
commit d17713eff9
14 changed files with 164 additions and 188 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@
# Added by cargo
/target
/result

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1720031269,
"narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9f4128e00b0ae8ec65918efeba59db998750ead6",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

14
flake.nix Normal file
View file

@ -0,0 +1,14 @@
{
description = "License Managment tool";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = inputs@{ self, nixpkgs, ... }: {
legacyPackages = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (system: import ./nix {
inherit system inputs;
pkgs = nixpkgs.legacyPackages.${system};
});
};
}

View file

@ -1,35 +1,7 @@
project(
'lf2',
'c',
'cpp',
meson_version: '>=0.58.0',
default_options: [
'cpp_std=c++20',
'warning_level=2',
],
'cpp'
)
cppc = meson.get_compiler('cpp')
subdir('native')
prefix = get_option('prefix')
data_dir = get_option('datadir')
lib_dir = get_option('libdir')
add_project_arguments(cppc.get_supported_arguments([
'-Wno-unused-parameter',
'-Wno-missing-field-initializers',
'-Wno-c99-designator',
'-Wno-invalid-offsetof',
'-Wno-unused-const-variable',
'-Wno-volatile', # glm warning
'-Wno-deprecated-volatile',
]), language: 'cpp')
add_project_arguments(cppc.get_supported_arguments([
'-ffast-math',
]), language: 'cpp')
sqlite3_dep = dependency('sqlite3')
vulkan_dep = dependency('vulkan')
subdir('src')

6
native/main.cpp Normal file
View file

@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "Hello World!";
return 0;
}

5
native/meson.build Normal file
View file

@ -0,0 +1,5 @@
executable(
'license-tool',
'main.cpp',
install: true,
)

19
nix/backend.nix Normal file
View file

@ -0,0 +1,19 @@
{
lib,
rustPlatform,
stdenv,
}:
rustPlatform.buildRustPackage rec {
pname = "backend";
version = "0.1";
src = ../.;
cargoHash = "sha256-NRrWWD3e2zm4rVYyCPm3vQhPDRkVMauTnoENwRucXcw=";
meta = with lib; {
platforms = lib.platforms.all;
mainProgram = "backend";
};
}

7
nix/default.nix Normal file
View file

@ -0,0 +1,7 @@
{ system, pkgs, inputs }:
{
native = pkgs.callPackage ./native.nix {};
backend = pkgs.callPackage ./backend.nix {};
web = pkgs.callPackage ./web.nix {};
}

21
nix/native.nix Normal file
View file

@ -0,0 +1,21 @@
{
lib,
stdenv,
meson,
ninja,
}:
stdenv.mkDerivation {
pname = "native";
version = "0.1";
src = ../.;
nativeBuildInputs = [ meson ninja ];
meta = {
maintainers = with lib.maintainers; [ jopejoe1 ];
mainProgram = "license-tool";
platforms = lib.platforms.all;
};
}

30
nix/web.nix Normal file
View file

@ -0,0 +1,30 @@
{
stdenv,
lib,
pnpm,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "web";
version = "0.1";
src = ../web;
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-dTXWbUDjmlIlMZ/sIFaInTRmVdWpyzJA4oadJAzUivs=";
};
nativeBuildInputs = [
pnpm.configHook
];
buildInputs = [
];
dontStrip = true;
meta = with lib; {
platforms = lib.platforms.all;
};
})

1
web/components.d.ts vendored
View file

@ -8,5 +8,6 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
StartPage: typeof import('./src/components/StartPage.vue')['default']
}
}

View file

@ -1,11 +1,17 @@
<template>
<v-app>
<v-main>
<HelloWorld />
<StartPage />
</v-main>
</v-app>
</template>
<script setup lang="ts">
import StartPage from './components/StartPage.vue';
//
</script>
<style scoped>
</style>

View file

@ -1,157 +0,0 @@
<template>
<v-container class="fill-height">
<v-responsive
class="align-centerfill-height mx-auto"
max-width="900"
>
<v-img
class="mb-4"
height="150"
src="@/assets/logo.png"
/>
<div class="text-center">
<div class="text-body-2 font-weight-light mb-n1">Welcome to</div>
<h1 class="text-h2 font-weight-bold">Vuetify</h1>
</div>
<div class="py-4" />
<v-row>
<v-col cols="12">
<v-card
class="py-4"
color="surface-variant"
image="https://cdn.vuetifyjs.com/docs/images/one/create/feature.png"
prepend-icon="mdi-rocket-launch-outline"
rounded="lg"
variant="outlined"
>
<template #image>
<v-img position="top right" />
</template>
<template #title>
<h2 class="text-h5 font-weight-bold">Get started</h2>
</template>
<template #subtitle>
<div class="text-subtitle-1">
Change this page by updating <v-kbd>{{ `<HelloWorld />` }}</v-kbd> in <v-kbd>components/HelloWorld.vue</v-kbd>.
</div>
</template>
<v-overlay
opacity=".12"
scrim="primary"
contained
model-value
persistent
/>
</v-card>
</v-col>
<v-col cols="6">
<v-card
append-icon="mdi-open-in-new"
class="py-4"
color="surface-variant"
href="https://vuetifyjs.com/"
prepend-icon="mdi-text-box-outline"
rel="noopener noreferrer"
rounded="lg"
subtitle="Learn about all things Vuetify in our documentation."
target="_blank"
title="Documentation"
variant="text"
>
<v-overlay
opacity=".06"
scrim="primary"
contained
model-value
persistent
/>
</v-card>
</v-col>
<v-col cols="6">
<v-card
append-icon="mdi-open-in-new"
class="py-4"
color="surface-variant"
href="https://vuetifyjs.com/introduction/why-vuetify/#feature-guides"
prepend-icon="mdi-star-circle-outline"
rel="noopener noreferrer"
rounded="lg"
subtitle="Explore available framework Features."
target="_blank"
title="Features"
variant="text"
>
<v-overlay
opacity=".06"
scrim="primary"
contained
model-value
persistent
/>
</v-card>
</v-col>
<v-col cols="6">
<v-card
append-icon="mdi-open-in-new"
class="py-4"
color="surface-variant"
href="https://vuetifyjs.com/components/all"
prepend-icon="mdi-widgets-outline"
rel="noopener noreferrer"
rounded="lg"
subtitle="Discover components in the API Explorer."
target="_blank"
title="Components"
variant="text"
>
<v-overlay
opacity=".06"
scrim="primary"
contained
model-value
persistent
/>
</v-card>
</v-col>
<v-col cols="6">
<v-card
append-icon="mdi-open-in-new"
class="py-4"
color="surface-variant"
href="https://discord.vuetifyjs.com"
prepend-icon="mdi-account-group-outline"
rel="noopener noreferrer"
rounded="lg"
subtitle="Connect with Vuetify developers."
target="_blank"
title="Community"
variant="text"
>
<v-overlay
opacity=".06"
scrim="primary"
contained
model-value
persistent
/>
</v-card>
</v-col>
</v-row>
</v-responsive>
</v-container>
</template>
<script setup lang="ts">
//
</script>

View file

@ -0,0 +1,24 @@
<template>
<div style="display: flex;">
<div style="flex: 30%">
<h1>Start Page</h1>
<p>Welcome to the start page</p>
</div>
<div style="flex: 70%;">
<h1>Start Page</h1>
<p>Welcome to the start page</p>
</div>
</div>
</template>
<script setup lang="ts">
</script>
<style scoped>
</style>